commit b135c965f6f33150f648a35607c12daeac1c360e
Author: Enrico Forestieri <[email protected]>
Date: Mon Jun 19 18:17:31 2023 +0200
Use \ifthenelse instead of relying on TeX primitives
This fixes the issue reported here:
https://www.mail-archive.com/[email protected]/msg115156.html
---
lib/scripts/legacy_lyxpreview2ppm.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/scripts/legacy_lyxpreview2ppm.py
b/lib/scripts/legacy_lyxpreview2ppm.py
index 6ee5870..fce5e91 100644
--- a/lib/scripts/legacy_lyxpreview2ppm.py
+++ b/lib/scripts/legacy_lyxpreview2ppm.py
@@ -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
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs