On 2015-11-06, Guenter Milde wrote:
> On 2015-11-06, Kornel Benko wrote:

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

>> Am Donnerstag, 5. November 2015 um 20:12:53, schrieb Guenter Milde 
>> <mi...@users.sf.net>
>> ...

>>>    pass "LaTeXFeatures & features" as argument
>>>    and test for "features.runparams().flavor == OutputParams::XETEX"
>>>    (cf. BufferParams::writeEncodingPreamble().

>>>    Alternatively, pass and use just "runparams".

>>>    +1 solves the FIXME
>>>    +1 logic at one place
>>>    +1 calling BufferParams::encoding() returns the correct encoding
>>>    +1 remove hack and FIXME from Buffer.cpp (2 instances).

>>>    -3 all calls must be changed to hand over an instance of

>>>      "LaTeXFeatures" or "runparams".

>>> I need both, advise on which way to go and a helping hand with the actual
>>> implementation.

>> I'd say this is the right way. But I wonder why BufferParams class does
>> not have access to features.

> From the source doc:

>   Buffer parameters.

>   This class contains all the parameters for this buffer's use.

> These are known once a document is loaded into the buffer and only change
> when updating Document>Settings.

> The export target and "flavour" is only known after a user request to export
> the document.

> One more idea:

> Encoding const & BufferParams::encoding() const
> {
>       // FIXME: additionally, we must check for runparams().flavor == XeTeX
>       // to care for the combination of XeTeX and TeX-fonts (see #9740).
>       // Currently, we reset the encoding in Buffer::makeLaTeXFile
>       // (for export) and Buffer::writeLaTeXSource (for preview).

> Would it help to set BufferParams::inputenc to "ascii" as soon as we know
> the export uses XeTeX? 

Answering myself: no - as this would stick for the next export -- possibly
with another "flavour".


Another way out would be to disable XeTeX export unless either the
inputencoding is set to ASCII or the font-set to non-TeX-fonts.

Günter

Reply via email to