diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 756db7da59..b7e28742f3 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -1554,7 +1554,10 @@ void Preamble::parse(Parser & p, string const & forceclass, // remove LyX-specific definitions that are re-added by LyX // if necessary - if (name == "\\lyxdot" || name == "\\lyxarrow") { + // \lyxline is an ancient command that is converted by tex2lyx into + // a \rule therefore remove its preamble code + if (name == "\\lyxdot" || name == "\\lyxarrow" + || name == "\\lyxline") { p.skip_spaces(); in_lyx_preamble = true; } diff --git a/src/tex2lyx/test/test-insets-basic.tex b/src/tex2lyx/test/test-insets-basic.tex index ffd6d6dd31..32f6ad4544 100644 --- a/src/tex2lyx/test/test-insets-basic.tex +++ b/src/tex2lyx/test/test-insets-basic.tex @@ -479,7 +479,7 @@ The following tow don't work, but they should??? test -{\tiny{}\rule[0.5ex]{1\linewidth}{1pt}}{\tiny \par} +{\tiny \rule[0.5ex]{1\linewidth}{1pt}}{\tiny \par} test {\Huge Test} {\tiny test} test diff --git a/src/tex2lyx/test/test-insets.tex b/src/tex2lyx/test/test-insets.tex index 782b14b2ea..013fd57570 100644 --- a/src/tex2lyx/test/test-insets.tex +++ b/src/tex2lyx/test/test-insets.tex @@ -502,7 +502,7 @@ The following tow don't work, but they should??? test -{\tiny{}\rule[0.5ex]{1\linewidth}{1pt}}{\tiny \par} +{\tiny \rule[0.5ex]{1\linewidth}{1pt}}{\tiny \par} test {\Huge Test} {\tiny test} test