LaTeX:修正向后引号

阅读:258

Mukesh Chapagain 2016-06-06 00:00:00    Mukesh Chapagain笔记


在LaTeX,如果你以正常的方式写报价(标点符号),那么你会遇到问题。通常我们用引号将词语写成:“你的话”。这在LaTeX中显示为“您的单词”(开始和结束报价面向同一侧)。

在LaTeX中正确的书面报价方式是:


1

2

`Your word'    = for single quote

``Your words'' = for double quotes


您还可以使用csquotes包来实现此目的。


1

2

\enquote{Your words}  = for single quote

\enquote*{Your words} = for double quotes


注意:报价设施是上下文敏感的。如果您使用“english”(美国)作为babel包的选项,则单引号和双引号将切换。我使用'英国'选项为babel包。

这里是使用csquotes包的示例文档代码。


1

2

3

4

5

6

7

8

9

10

11

12

13

\documentclass{article}

\usepackage[british]{babel}

\usepackage{csquotes}

 

\begin{document}

 

This will not work: "General quotation mark"

 

(generates backward quotation mark at the beginning) \\

 

This will work: \enquote{Hello Single World} and \enquote*{Testing Double}

 

\end{document}


输出:


希望这可以帮助。
谢谢。

分享这个:


LaTeX: Fix for Backward Quotation Mark

阅读:258

Mukesh Chapagain 2016-06-06 00:00:00


In LaTeX, if you write quotation (punctuation) mark in normal way then you will get into problem. Normally we write word with quotation as: “Your words”. This is displayed as ”Your words” in LaTeX (both opening and closing quote facing the same side).

The proper way of writing quotation in LaTeX is:


1

2

`Your word'    = for single quote

``Your words'' = for double quotes


You can also use csquotes package for this purpose.


1

2

\enquote{Your words}  = for single quote

\enquote*{Your words} = for double quotes


Note: The quotation facility is context sensitive. Single quote and Double quote will toggle if you use ‘english’ (american) as option for the babel package. I have used ‘british’ option for babel package.

Here is the sample document code using csquotes package.


1

2

3

4

5

6

7

8

9

10

11

12

13

\documentclass{article}

\usepackage[british]{babel}

\usepackage{csquotes}

 

\begin{document}

 

This will not work: "General quotation mark"

 

(generates backward quotation mark at the beginning) \\

 

This will work: \enquote{Hello Single World} and \enquote*{Testing Double}

 

\end{document}


Output:


Hope this helps.
Thanks.

Share this:


相关标签:
latex