]> git.lyx.org Git - features.git/commitdiff
tex2lyx: addendum to r39949; handle the case that LyX's defined colors are defined...
authorUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 00:31:02 +0000 (00:31 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 00:31:02 +0000 (00:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39989 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/preamble.cpp
src/tex2lyx/test/box-color-size-space-align.tex

index fb31e65a3a239b4c4e0f34bfd919c92da8e8d601..dafceb42e0fdc3e415447e10a350cf0851b532e9 100644 (file)
@@ -915,6 +915,24 @@ void parse_preamble(Parser & p, ostream & os,
                                h_suppress_date = "true";
                }
 
+               else if (t.cs() == "color") {
+                       string argument = p.getArg('{', '}');
+                       // check the case that not a color defined by LyX is used
+                       if (argument != "document_fontcolor") {
+                               h_preamble << t.asInput() << '{' << argument << '}';
+                               h_fontcolor = "";
+                       }
+               }
+
+               else if (t.cs() == "pagecolor") {
+                       string argument = p.getArg('{', '}');
+                       // check the case that not a color defined by LyX is used
+                       if (argument != "page_backgroundcolor") {
+                               h_preamble << t.asInput() << '{' << argument << '}';
+                               h_backgroundcolor = "";
+                       }
+               }
+
                else if (t.cs() == "makeatletter") {
                        // LyX takes care of this
                        p.setCatCode('@', catLetter);
index 33d76cd00899d5c4951c89dd282770d124124967..dcbfb70d3bb5ae111d9ebe729459c1ff57e14d87 100644 (file)
@@ -15,7 +15,7 @@
 \definecolor{document_fontcolor}{rgb}{0.66796875, 1, 0}
 \color{document_fontcolor}
 \definecolor{note_fontcolor}{rgb}{0, 0, 1}
-\definecolor{shadecolor}{rgb}{1, 0, 0}
+\definecolor{shadecolor}{rgb}{1, 1, 0}
 \usepackage{framed}
 \usepackage{calc}
 \usepackage{fancybox}