// decorations at all
&& inset->lyxCode() != ERT_CODE) {
if (running_font.language()->lang() == "farsi")
- os << "\\beginL{}";
+ os << "\\beginL" << termcmd;
else
os << "\\L{";
close = true;
if (close) {
if (running_font.language()->lang() == "farsi")
- os << "\\endL{}";
+ os << "\\endL" << termcmd;
else
os << '}';
}
// Otherwise, we use what LaTeX provides us.
switch (c) {
case '\\':
- os << "\\textbackslash{}";
+ os << "\\textbackslash" << termcmd;
column += 15;
break;
case '<':
- os << "\\textless{}";
+ os << "\\textless" << termcmd;
column += 10;
break;
case '>':
- os << "\\textgreater{}";
+ os << "\\textgreater" << termcmd;
column += 13;
break;
case '|':
- os << "\\textbar{}";
+ os << "\\textbar" << termcmd;
column += 9;
break;
case '-':
}
break;
case '\"':
- os << "\\char`\\\"{}";
+ os << "\\char`\\\"" << termcmd;
column += 9;
break;
break;
case '~':
- os << "\\textasciitilde{}";
+ os << "\\textasciitilde" << termcmd;
column += 16;
break;
case '^':
- os << "\\textasciicircum{}";
+ os << "\\textasciicircum" << termcmd;
column += 17;
break;
// but we should avoid ligatures
if (i + 1 >= int(text_.size()) || text_[i + 1] != c)
return true;
- os << "\\textcompwordmark{}";
+ os << "\\textcompwordmark" << termcmd;
column += 19;
return true;
case '|':
return true;
case '\"':
// soul.sty breaks with \char`\"
- os << "\\textquotedbl{}";
+ os << "\\textquotedbl" << termcmd;
column += 14;
return true;
default:
os.put(c);
return true;
case '|':
- os << "\\textvertline{}";
+ os << "\\textvertline" << termcmd;
column += 14;
return true;
default:
runparams);
}
+ runparams.wasDisplayMath = runparams.inDisplayMath;
runparams.inDisplayMath = false;
bool deleted_display_math = false;
basefont, outerfont, open_font,
runningChange, style, i, column);
}
- } else {
- if (i >= start_pos && (end_pos == -1 || i < end_pos)) {
- try {
- d->latexSpecialChar(os, bparams, rp, running_font, runningChange,
- style, i, end_pos, column);
- } catch (EncodingException & e) {
+ } else if (i >= start_pos && (end_pos == -1 || i < end_pos)) {
+ try {
+ d->latexSpecialChar(os, bparams, rp,
+ running_font, runningChange,
+ style, i, end_pos, column);
+ } catch (EncodingException & e) {
if (runparams.dryrun) {
os << "<" << _("LyX Warning: ")
<< _("uncodable character") << " '";
}
}
}
- }
// Set the encoding to that returned from latexSpecialChar (see
// comment for encoding member in OutputParams.h)
bool Paragraph::isNewline(pos_type pos) const
{
+ // U+2028 LINE SEPARATOR
+ // U+2029 PARAGRAPH SEPARATOR
+ char_type const c = d->text_[pos];
+ if (c == 0x2028 || c == 0x2029)
+ return true;
Inset const * inset = getInset(pos);
return inset && inset->lyxCode() == NEWLINE_CODE;
}
}
+void Paragraph::resetBuffer()
+{
+ d->insetlist_.resetBuffer();
+}
+
+
Inset * Paragraph::releaseInset(pos_type pos)
{
Inset * inset = d->insetlist_.release(pos);