\section{Special characters\index{Special characters}}
Then one has those macros with a long name for a short meaning, like
-\textasciitilde, \textasciicircum{} or \textbackslash{}, and the characters
+\textasciitilde, \textasciicircum{} or \textbackslash{}, \slash{},
+\nobreakdash and the characters
that LaTeX wants to espace because they are active, like \_\&\#\$\{\}\%.
And what about special characters like hyphe\-nation mark,
skip_braces(p);
}
+ else if (LYX_FORMAT >= 307 && t.cs() == "slash") {
+ context.check_layout(os);
+ os << "\\SpecialChar \\slash{}\n";
+ skip_braces(p);
+ }
+
+ else if (LYX_FORMAT >= 307 && t.cs() == "nobreakdash") {
+ context.check_layout(os);
+ os << "\\SpecialChar \\nobreakdash\n";
+ }
+
else if (t.cs() == "textquotedbl") {
context.check_layout(os);
os << "\"";
else {
// try to see whether the string is in unicodesymbols
+ // Only use text mode commands, since we are in text mode here,
+ // and math commands may be invalid (bug 6797)
docstring rem;
- docstring s = encodings.fromLaTeXCommand(from_utf8(t.asInput()), rem);
+ docstring s = encodings.fromLaTeXCommand(from_utf8(t.asInput()),
+ rem, Encodings::TEXT_CMD);
if (!s.empty()) {
if (!rem.empty())
cerr << "When parsing " << t.cs()