From: Georg Baum Date: Thu, 30 Dec 2010 20:38:47 +0000 (+0000) Subject: fix translation of \nobreakdash in tex2lyx X-Git-Tag: 2.0.0~1221 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d6ccb86f1528389072e0e2321da756e48c9e0d2a;p=features.git fix translation of \nobreakdash in tex2lyx git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37050 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/test/test-insets.tex b/src/tex2lyx/test/test-insets.tex index 2dea2448c9..7136f2eeb2 100644 --- a/src/tex2lyx/test/test-insets.tex +++ b/src/tex2lyx/test/test-insets.tex @@ -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, diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 3e25ef53e1..d901e18150 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -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") {