#include "Paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
+#include "TextClass.h"
#include "TextMetrics.h"
#include "VSpace.h"
#include "WordLangTuple.h"
#include "insets/InsetSpecialChar.h"
#include "insets/InsetTabular.h"
+#include "support/docstream.h"
#include "support/lstrings.h"
#include "support/textutils.h"
#include "support/convert.h"
using support::bformat;
using support::contains;
using support::split;
+using support::subst;
using cap::cutSelection;
using cap::pasteParagraphList;
break;
}
- LYXERR(Debug::PARSER) << "Handling paragraph token: `"
- << token << '\'' << endl;
+ LYXERR(Debug::PARSER, "Handling paragraph token: `" << token << '\'');
if (token == "\\begin_layout" || token == "\\end_document"
|| token == "\\end_inset" || token == "\\begin_deeper"
|| token == "\\end_deeper") {
ParagraphList plist;
if (cur.lastpit() != 0 || cur.lastpos() != 0)
plist = paragraphs();
- cur.popLeft();
+ cur.popBackward();
// store cursor offset
if (spit == 0)
spos += cur.pos();
docstring text;
docstring par_text = pars_[pit].asString(cur.buffer(), false);
+ string piece;
+ // the return string of math matrices might contain linebreaks
+ par_text = subst(par_text, '\n', '-');
for (int i = 0; i < lyxrc.label_init_length; ++i) {
if (par_text.empty())
break;