From d6ccb86f1528389072e0e2321da756e48c9e0d2a Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Thu, 30 Dec 2010 20:38:47 +0000 Subject: [PATCH] fix translation of \nobreakdash in tex2lyx git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37050 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/test/test-insets.tex | 2 +- src/tex2lyx/text.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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") { -- 2.39.2