On 2016-12-04, mn wrote:

> [-- Type: text/plain, Encoding: 7bit --]

> On 04.12.16 20:44, Guenter Milde wrote:
>> On 2016-12-04, mn wrote:
>>>>> There might be some incorrect or unexpected behavior when switching
>>>>> output engines in LyX, because Xetex does not support input-encoding
>>>>> settings:

>>>>> To reproduce:
>>>>> Start a document,
...
>>>>> Try to compile the document.
>>>>> It will complain that inputenc is not suitable for the chosen engine.

>>>> Not here. It just compiles.

>>> I just retook the steps I outlined above again and had the same error
>>> again.

>> There must be something else in your document. Try with File>New and see
>> whether this produces the error.  If yes, send the document. If not, tell
>> what else is needed.

> "Language Package: Always Babel" (a remnant default)

This is the real reason: Babel-Hebrew is not suited for Unicode fonts.
Also, it always loads the inputenc package.
   
   We also need to load inputenc package with one of the Hebrew input
   encodings.
   [...]
   \AtEndOfPackage{%
   \@ifpackageloaded{inputenc}{}{\RequirePackage[8859-8]{inputenc}}}

You must use Polyglossia with "non-TeX fonts" and Hebrew (In LyX, setting
language module to "auto" is recommended.)

> one line in the preamble loading Minion Pro.

Actually, loading MinionPro with "use non-TeX fonts" is useless at best and
could be problematic. The package sets up 8-bit fonts.

Most probabely, the content of the preamble does not matter, 
anything exept an empty user preamble will do (see below).

> Source View for Format LyX displays
> "\inputencoding utf8"
> while set for default-output: XeTeX

I cannot reproduce this here.

> To be sure I attached a small file demoing the error as is.

This reveals one more precondition: Hebrew text in the file.
Remove this and it should compile OK. Any text (even ASCII) set to "language
hebrew" should trigger the error (given the other preconditios), because
then Babel-Hebrew loads inputenc.


Cannot reproduce with either LyX 2.2 or 2.3(dev).

Now to the mystery:

> Source View for Format LyX displays
> "\inputencoding utf8"
> while set for default-output: XeTeX

seems to indicate that you are using LyX 2.1 and a bug in this version
resulted in a workaround for a bug in your document and a bug in inputenc.

I wonder if you could trigger an: "\inputencoding undefined" error with your
document and LyX version when removing the Hebrew text or setting the
language package to "auto" or "polyglossia".

In any case, I don't believe we should unhide the inputenc setting with
"non-TeX fonts".

Günter

Reply via email to