docstring cmd;
for (char_type c : s) {
try {
- Encodings::latexMathChar(c, false, os.encoding(), cmd, space);
+ Encodings::latexMathChar(c, true, os.encoding(), cmd, space);
os << cmd;
os.pendingSpace(space);
} catch (EncodingException const & e) {
return;
}
- docstring::const_iterator cit = s.begin();
- docstring::const_iterator end = s.end();
-
// We may already be inside an \ensuremath command.
bool in_forced_mode = os.pendingBrace();
// We will take care of matching braces.
os.pendingBrace(false);
- while (cit != end) {
+ for (char_type const c : s) {
bool mathmode = in_forced_mode ? os.textMode() : !os.textMode();
- char_type const c = *cit;
docstring command(1, c);
try {
bool termination = false;
throw(e);
}
}
- ++cit;
}
if (in_forced_mode && os.textMode()) {