0

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.”’

1 Answers1

2

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

`\mbox{}``

would work. and at the other side

'\mbox{}''
David Carlisle
  • 757,742
  • 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
  • @JosephWright well conceptually what is wanted is ’” and there to be no ligature between those characters emulating a typewriter era input convention. – David Carlisle Jan 20 '18 at 22:28
  • Thank you. There does not seem to be any easy way out of this on the LuaTex side*. I'll have to take my LaTex code and do a Find & Replace on '{} to \textquoteleft or '\mbox{}.

    Because I am using American English, the left quote problem is very unlikely to ever come up (quotation-within-quotation-within-quotation).

    – Jonathan Joseph Chiarella Jan 20 '18 at 22:30
  • @JonathanJosephChiarella I do not know lyx at all but can you not enter ’” using the curly quotes directly they should go straight through tex without unwanted ligatures – David Carlisle Jan 20 '18 at 22:37
  • Was there a rationale for not suppressing ligatures with {} in luatex, given the prior behavior in pdflatex? –  Jan 21 '18 at 00:17
  • 2
    @RobtAll the braces aren't reliable in pdflatex either see https://tex.stackexchange.com/questions/209449/ligatures-and-hyphenations-the-effect-of-empty-brace-groups – Ulrike Fischer Jan 21 '18 at 07: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 09:07