TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In LyX, when I enter quoted text, the generated LaTeX source has uses different quotes for left and right: `` for the former and '' for the latter so that

"Ugly quotes"


``Ugly quotes''

which (for some fonts and engines) produces corresponding (unacceptable) output for the left quotes.

Is there a way to prevent this? Are there packages that I can use to "repair" the left quotes?

[OS X 10.7.3; LyX 2.0.3]

share|improve this question
What unacceptable output do you get? – Ben Alpert Mar 11 '12 at 22:53
If you're using XeLaTeX, you need to teach LyX to add the Ligatures=TeX option to the font definition with \fontspec or \setmainfont (or the other similar commands). – egreg Mar 11 '12 at 22:56
@egreg: Cool. That fixes the immediate problem (though it's still odd that they're there in the source). – raxacoricofallapatorius Mar 11 '12 at 23:06
It's by no means odd: opening quotes should be different from closing ones. Inputting both as " requires some kind of intervention. You can input them as and – egreg Mar 11 '12 at 23:11
@ereg: That's what they look like as displayed by LyX, but the code changes them as above. In any case, It looks like your comments are my answer. – raxacoricofallapatorius Mar 11 '12 at 23:37
up vote 2 down vote accepted

A convenient way to input quotes is to write


but, of course, the quotes must be rendered differently. The traditional TeX way is to input quotes as


and it seems that "smart quotes" in LyX does this translation. However this will produce by default the correct and expected result in case XeLaTeX is used for typesetting with system font different from the default Latin Modern.

There are two way out:

  1. Teach LyX to add the option Ligatures=TeX when the document fonts are chosen with \setmainfont or similar commands

    \setmainfont[Ligatures=TeX]{Linux Libertine O}
  2. Input quotes with the proper Unicode characters

share|improve this answer
That works. It would be nice if there were a LyX setting to generate unicode quotes. – raxacoricofallapatorius Mar 12 '12 at 0:39

You can set the quote style in LyX for each document. Just go to Document Settings > Language > Quote Style

See Quotes in the User Guide (Help > User Guide)

share|improve this answer
I can't get that to have any effect. – raxacoricofallapatorius Mar 12 '12 at 0:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.