On 2019-07-02, Kornel Benko wrote:
> Am Dienstag, 2. Juli 2019, 10:20:56 CEST schrieb Guenter Milde:
>> > Sorry, I don't feel easy at hiding problems.

>> What do you propose?

> The provided mwe.lyx from Jürgen compiles fine with lyx2.3, but does
> not compile with lyx2.4.

Yes, lyx2.4 exposes a bug recently introduced in expl3.sty while lyx2.3
works around it (TL 17 works with 2.4 as well as 2.3).

> The difference between mwe2.3.tex and mwe2.4.tex are
>       \XeTeXinputencoding "bytes" % current file
>       \XeTeXdefaultencoding "bytes" % included files
>       \makeatletter
>       \let\origUmathchar\Umathchar
>       \let\Umathchar\@undefined
>       \usepackage[utf8]{inputenc}
>       \let\Umathchar\origUmathchar
>       \makeatother

> Removing the line
>       \usepackage[utf8]{inputenc}
> is sufficient to make it compile.

However, this is only because the minimal example is so minimal, that it
does only contain ASCII characters. With most non-ASCII characters, you
will get wrong output, missing characters, or compilation errors.
See https://www.lyx.org/trac/ticket/9740

> But you are the one who knows why this is needed.

This is explained in detail in https://www.lyx.org/trac/ticket/10600 :

Summary:

The combination XeTeX + TeX fonts is rarely used, rarely tested and fails
with a lot of packages. Even "inputenc.sty" stopped working with XeTeX
(without the above cited workaround). There is no known case where this
combination is required or helpfull.

Nevertheless, LyX uses this abnormal combination when clicking
the "View XeTeX" toolbar button for a document set to use TeX fonts
and it is part of the ctest tests.


My fix for #9740 included forcing ASCII as input encoding for the
combination XeTeX+TeX fonts.

Unfortunately, using the ASCII input encoding leads to other problems
(try compiling the German User Guide with XeTeX).

Forcing ASCII was a bad idea and should not be restored.

Options are:

a) Just mark this expl3 bug as one of the many problems for XeTeX with TeX
   fonts. Ignore the affected tests.

b) As a) but also file a bug report for expl3.sty.
   Invert the affected tests.

c) Drop support for XeTeX + TeX fonts + utf8.
   (Enable compiling with XeTeX and TeX fonts only for input encodings
    "ascii" and "utf8-plain".)
   Ignore affected tests.


What do you prefer?



>> >> The problem with LuaTeX and system fonts is more urgent and needs to be
>> >> investigated/handled separately.



Günter

Reply via email to