From 1bcba82d8d536dd50020c02ee4c6be4675165458 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Thu, 18 Jun 2009 23:35:49 +0000 Subject: [PATCH] tex2lyx/preamble.cpp: fix a bug reported by JMarc git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30165 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/preamble.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index 11979a9b77..ebd6f4b7da 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -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) { -- 2.39.2