]> git.lyx.org Git - features.git/commitdiff
fix translation of \nobreakdash in tex2lyx
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 30 Dec 2010 20:38:47 +0000 (20:38 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 30 Dec 2010 20:38:47 +0000 (20:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37050 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/test/test-insets.tex
src/tex2lyx/text.cpp

index 2dea2448c9f10a7e80923ce6ef91018c711c3fc8..7136f2eeb2e32f6788c266f53fc8ce0641cbf603 100644 (file)
@@ -285,7 +285,7 @@ or by a defined page break \pagebreak[4]
 
 Then one has those macros with a long name for a short meaning, like
 \textasciitilde, \textasciicircum{} or \textbackslash{}, \slash{},
-\nobreakdash and the characters
+\nobreakdash- and the characters
 that LaTeX wants to espace because they are active, like \_\&\#\$\{\}\%.
 
 And what about special characters like hyphe\-nation mark,
index 3e25ef53e148828d9379055f8a5c5e685a808ec9..d901e18150675ddf9ec3b377b2f27e66a94f5bfe 100644 (file)
@@ -2462,9 +2462,10 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        skip_spaces_braces(p);
                }
 
-               else if (t.cs() == "nobreakdash") {
+               else if (t.cs() == "nobreakdash" && p.next_token().asInput() == "-") {
                        context.check_layout(os);
-                       os << "\\SpecialChar \\nobreakdash\n";
+                       os << "\\SpecialChar \\nobreakdash-\n";
+                       p.get_token();
                }
 
                else if (t.cs() == "textquotedbl") {