On 2018-02-07, Helge Hafting wrote:
> To see the problem, set the typewriter font to "Tex Gyre Cursor".

> Check "Use non-TeX fonts (via XeTeX/LuaTeX)"

> Now, write something like "cat >> myfile.txt" (for a linux tutorial)

> Set the text style to "code", or customize it to "typewriter", or use 
> the paragraph style "LyX Code".

> Any way of invoking typewriter, will, upon PDF export, yield a variant of:

> Missing character: There is no <200c> in font TeX Gyre 
> Cursor/OT:script=latn;languag

Thank you for reporting.

Yes. There are unfortunately many fonts that miss this character.
This was not a problem in the old times, but 
since TeXLive 2016, "fontspec" maps the ligature break
command \textcompwordmark to the ZWNJ character (U+200C).

> In some cases, the 200c is invisible (it is a unicode zero-width 
> non-joiner - so it will not render any symbol) and that makes the error 
> message hard to read.

> Also, there should be no such error message because I did not enter any 
> zero-width non-joiner. 

I agree that debugging is especially difficult for characters that are
both, invisible and added by LyX. However, the error message does not
depend on characters you type but on characters LaTeX attempts to typeset
for a good reason (you would not want to miss an "å" in a Babel-generated
string, would you?)

That said, I also agree that in this case the error is spurious.
Therefore this is fixed in 2.3 and 2.2.4

See https://www.lyx.org/trac/ticket/10727 for details.

> Is this some attempt at preventing ">>" from 
> turning into a guillemet (»)?

Yes. You can check with View>Code Preview.

> Tex Gyre Termes (improved clone of Times Roman) seems to have the same 
> problem. Set this as the main font, and type >> in plain text and it breaks.

> It seems to me that something is broken with "Use non-TeX fonts"? Or is 
> the TeX Gyre font collection considered broken?

> My obvious workaround is to insert a ligature break, but that does not 
> remove all the error messages. Inserting an empty vertical phantom works 
> - but it is a kludge. It'd be so much nicer if typing >> would just work.

It does if you update LyX.


Reply via email to