commit a2c1229ac129dcc8033dac5a9846b7f0fd50a6a1
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Oct 24 17:10:37 2024 +0200

    Handle backslash at end of line
    
    This occurs when importing the sampleart.ltx file from ltugboat document 
class.
---
 src/tex2lyx/Parser.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp
index d048995d15..11349aac41 100644
--- a/src/tex2lyx/Parser.cpp
+++ b/src/tex2lyx/Parser.cpp
@@ -882,6 +882,9 @@ void Parser::tokenize_one()
                if (!is_) {
                        error("unexpected end of input");
                } else {
+                       // A single \ at the end of a line is like "\ "
+                       if (catcode(c) == catNewline)
+                               c = ' ';
                        docstring s(1, c);
                        if (catcode(c) == catLetter) {
                                // collect letters
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to