commit 111df7b60042cceca3f5566bb44d11b03e19f689
Author: Uwe Stöhr <[email protected]>
Date:   Mon May 25 01:48:28 2015 +0200

    tex2lyx/Preamble.cpp: handle \lyxline

diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index 756db7d..b7e2874 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 ffd6d6d..32f6ad4 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 782b14b..013fd57 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
 

Reply via email to