]> git.lyx.org Git - features.git/commitdiff
tex2lyx/preamble.cpp: fix a bug reported by JMarc
authorUwe Stöhr <uwestoehr@web.de>
Thu, 18 Jun 2009 23:35:49 +0000 (23:35 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Thu, 18 Jun 2009 23:35:49 +0000 (23:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30165 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/preamble.cpp

index 11979a9b772eee4183c88b528b4657b5bc1cc59b..ebd6f4b7da7eeb8ee2b2c05eaaf178826d74252f 100644 (file)
@@ -120,7 +120,6 @@ const char * const known_lyx_comments[] = {
 "% the following is useful when we have the old nomencl.sty package\n",
 "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.\n",
 "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.\n",
-"%% LyX 2.0.0svn created this file.  For more info, see http://www.lyx.org/.\n",
 0};
 
 // default settings
@@ -635,7 +634,10 @@ void parse_preamble(Parser & p, ostream & os,
                        string lyx_command = name;
                        // remove the leading "\"
                        lyx_command.erase(0,1);
-                       if (is_known(lyx_command, known_lyx_commands))
+                       lyx_specific_preamble = false;
+                       // allow redefinitions of LyX specific commands
+                       if (is_known(lyx_command, known_lyx_commands)
+                               && (t.cs() != "renewcommand"))
                                lyx_specific_preamble = true;
                        // only non-lyxspecific stuff
                        if (!lyx_specific_preamble) {