Author: baum
Date: Thu Dec 30 21:38:47 2010
New Revision: 37050
URL: http://www.lyx.org/trac/changeset/37050
Log:
fix translation of \nobreakdash in tex2lyx
Modified:
lyx-devel/trunk/src/tex2lyx/test/test-insets.tex
lyx-devel/trunk/src/tex2lyx/text.cpp
Modified: lyx-devel/trunk/src/tex2lyx/test/test-insets.tex
==============================================================================
--- lyx-devel/trunk/src/tex2lyx/test/test-insets.tex Thu Dec 30 21:29:33
2010 (r37049)
+++ lyx-devel/trunk/src/tex2lyx/test/test-insets.tex Thu Dec 30 21:38:47
2010 (r37050)
@@ -285,7 +285,7 @@
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,
Modified: lyx-devel/trunk/src/tex2lyx/text.cpp
==============================================================================
--- lyx-devel/trunk/src/tex2lyx/text.cpp Thu Dec 30 21:29:33 2010
(r37049)
+++ lyx-devel/trunk/src/tex2lyx/text.cpp Thu Dec 30 21:38:47 2010
(r37050)
@@ -2462,9 +2462,10 @@
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") {