In LyX, you can set Document>Settings>Language to either

 (*) Language default
 ( ) Other

With "Other", you set *one* encoding for the whole document,
with "Language default" the encoding is taken from the 'languages'
config file and there can be more than one encoding in the document.

To get multiple defined encodings from a latex file into a lyx
document, the best try is using "auto" encoding (i.e. "Language
default").

OK, so what about just keeping the last encoding and, after finishing
the parsing of preamble, resetting this encoding to "auto" if it is
the default encoding for the language?

Or just set the encoding to "auto" unconditionally?

The current scheme is arbitrary and not predictable IMO. I do not see why counting
encodings and language means something. Moreover, it seems that it
fails if the babel statement is after the inputenc package loading.

JMarc

Reply via email to