On 2015-11-22, Uwe Stöhr wrote:
> Am 20.11.2015 um 11:40 schrieb Guenter Milde:


>> The reason is, that the preamble has the code:

>>     % if pdflatex is used
>>     \usepackage{ifpdf}
>>     \ifpdf

>>      % set fonts for nicer pdf view
>>      \IfFileExists{lmodern.sty}
>>       {\usepackage{lmodern}}{}

>>     \fi % end if pdflatex is used

>> but \ifpdf is also true for XeTeX and LuaTeX with PDF-export.

> Interesting. This explains the problems.

> I propose the following solution:

> \usepackage{ifluatex}
> \ifluatex
>   % LuaLaTeX specific code
> \else % if XeTeX or pdflatex
>   \usepackage{ifpdf} % part of the hyperref bundle
>   \ifpdf % if pdflatex is used
>    % set fonts for nicer pdf view
>    \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
>   \fi % end if pdflatex is used
> \fi % end ifluatex

> instead of what I have currently in the preamble. This works for me. 
> Does this also work on your system?

No. We must test for Unicode fonts vs. 8-bit TeX fonts, this can be done via
testing for use of the "fontspec" package.

>> I proposed several fixes for this some posts ago. My suggestion is to invert
>> the tests for now and discuss the problem later.

> Could you point me to this? I cannot find the thread.

Scott kindly reposted it yesterday under a more appropriate subject line:

 21 Nov      :[Scott Kostys]    Re: Font of LyX manuals


Günter

Reply via email to