Use \ifthenelse instead of relying on TeX primitives

This fixes the issue reported here:
https://www.mail-archive.com/lyx-users@lists.lyx.org/msg115156.html
This commit is contained in:
Enrico Forestieri 2023-06-19 18:17:31 +02:00
parent f88986eff5
commit b135c965f6

View File

@ -252,11 +252,10 @@ def legacy_latex_file(latex_file, fg_color, bg_color):
\\definecolor{lyxbg}{rgb}{%s}
\\pagecolor{lyxbg}
\\usepackage[%s,tightpage]{preview}
\\usepackage{ifthen}
\\ifthenelse{\equal{\f@family}{cmr}}{
\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}}}{}
\\makeatletter
\\def\\t@a{cmr}
\\if\\f@family\\t@a
\\IfFileExists{lmodern.sty}{\\usepackage{lmodern}}{\\usepackage{ae,aecompl}}
\\fi
\\g@addto@macro\\preview{\\begingroup\\color{lyxbg}\\special{ps::clippath fill}\\color{lyxfg}}
\\g@addto@macro\\endpreview{\\endgroup}
\\makeatother