Typing in ' and then " results in LyX automatically converting these into ' and . The code changes into '{}'' so that the output is right single quote and then right double quote ’ ”. Without the {}, just as ''', the output would be right double quote and then right single quote ” ’. The same is true for ``{}`.

This is supposed to become left single quote and then left double quote ‘ “ and not left double quote and then left single quote “ ‘.

This works fine as expected in pdflatex.

However, LuaTex ignores the {} and treats the sequence as ''' or ```.

The fix one side is simple, if the user types ' and then ", change the code from '{}'' to '{}\textdblquoteright. As a matter of fact, change ALL cases of typed " to \textdblquoteright.

This is a problem in typical sentences like the following sentence I would type:

Brian said, ``Alice turned to me and yelled,Stop!'"`

Lyx displays:

Brian said, “Alice turned to me and yelled, ‘Stop!’”

Lyx's code:

Brian said, ``Alice turned to me and yelled, `Stop!'{}''

pdflatex output:

Brian said, “Alice turned to me and yelled, ‘Stop!’”

LuaTex output (incorrect):

Brian said, “Alice turned to me and yelled, ‘Stop!”’

Solving the left quote problem is very hard. If you have three quotations as in the following, there is no easy way out other than manually coding \textdblquoteleft. The following is fine, because double quotes come first:

Lucy said, “‘Sting’ is Gordon's stage name.”

The following requires typing out \textdblquoteleft to display correctly in LuaTex:

Alice said, “Lucy said, ‘“Sting” is Gordon's stage name.’”

As it is, LuaTex would display this as:

Alice said, “Lucy said, “‘Sting” is Gordon's stage name.”’

  • 2
    If lyx is generating this output, you could report it to the lyx maintainers. – David Carlisle Jan 20 '18 at 22:23

It is a documented feature that {} does not suppress ligatures in luatex so not a bug.


would work. and at the other side

| improve this answer | |
  • 1
    Surely \kern0pt? – Joseph Wright Jan 20 '18 at 22:23
  • @JosephWright makes no difference does it in practice? – David Carlisle Jan 20 '18 at 22:24
  • Perhaps not, but what is wanted conceptually is a kern ... – Joseph Wright Jan 20 '18 at 22:25
  • 2
    @RobtAll the braces aren't reliable in pdflatex either see tex.stackexchange.com/questions/209449/… – Ulrike Fischer Jan 21 '18 at 7:54
  • 1
    @RobtAll as Ulrike says, it doesn't really work in pdftex either (although does for quotes as there is no hyphenation pass then) but font handling in luatex is almost entirely different so it's not a matter of deciding to change this rather than not adding it as an emulation. – David Carlisle Jan 21 '18 at 9:07

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