commit a20477993bda8e9eaca1c8934e2b6f8991af562b
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sat Oct 8 16:42:55 2022 +0200

    Preview: do not overwrite fg/bg color names that beamer uses
    
    Rename them to lyxfg/lyxbg
    
    Fixes bug #12563.
---
 lib/scripts/legacy_lyxpreview2ppm.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/scripts/legacy_lyxpreview2ppm.py 
b/lib/scripts/legacy_lyxpreview2ppm.py
index 29eb833..6ee5870 100644
--- a/lib/scripts/legacy_lyxpreview2ppm.py
+++ b/lib/scripts/legacy_lyxpreview2ppm.py
@@ -235,9 +235,9 @@ def legacy_latex_file(latex_file, fg_color, bg_color):
             else:
                 tmp.write(b"""
 \\usepackage{color}
-\\definecolor{fg}{rgb}{%s}
-\\definecolor{bg}{rgb}{%s}
-\\pagecolor{bg}
+\\definecolor{lyxfg}{rgb}{%s}
+\\definecolor{lyxbg}{rgb}{%s}
+\\pagecolor{lyxbg}
 \\usepackage{polyglossia}
 """ % (fg_color_gr, bg_color_gr))
                 polyglossia = True
@@ -248,16 +248,16 @@ def legacy_latex_file(latex_file, fg_color, bg_color):
         if not polyglossia:
             tmp.write(b"""
 \\usepackage{color}
-\\definecolor{fg}{rgb}{%s}
-\\definecolor{bg}{rgb}{%s}
-\\pagecolor{bg}
+\\definecolor{lyxfg}{rgb}{%s}
+\\definecolor{lyxbg}{rgb}{%s}
+\\pagecolor{lyxbg}
 \\usepackage[%s,tightpage]{preview}
 \\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{bg}\\special{ps::clippath 
fill}\\color{fg}}
+\\g@addto@macro\\preview{\\begingroup\\color{lyxbg}\\special{ps::clippath 
fill}\\color{lyxfg}}
 \\g@addto@macro\\endpreview{\\endgroup}
 \\makeatother
 """ % (fg_color_gr, bg_color_gr, previewopts))
@@ -265,7 +265,7 @@ def legacy_latex_file(latex_file, fg_color, bg_color):
             tmp.write(b"""
 \\usepackage[%s,tightpage]{preview}
 \\makeatletter
-\\g@addto@macro\\preview{\\begingroup\\color{bg}\\special{ps::clippath 
fill}\\color{fg}}
+\\g@addto@macro\\preview{\\begingroup\\color{lyxbg}\\special{ps::clippath 
fill}\\color{lyxfg}}
 \\g@addto@macro\\endpreview{\\endgroup}
 \\makeatother
 """ % previewopts)
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to