On export, mark the start of the first paragraph

No newline is written after \begin{document}, such that
the afterParbreak method would return false. This misleads
the code that outputs a display math in an ulem command
to emit a newline command instead of \noindent, causing
latex errors. This occurs only if the math is at the very
start of a document, without anything before it.
This commit is contained in:
Enrico Forestieri 2016-10-23 18:04:13 +02:00
parent e335c764b4
commit 9ba76e6c40

View File

@ -1891,6 +1891,10 @@ void Buffer::writeLaTeXSource(otexstream & os,
os.texrow().start(TexRow::beginDocument());
os << "\\begin{document}\n";
// mark the start of a new paragraph by simulating a newline,
// so that os.afterParbreak() returns true at document start
os.lastChar('\n');
// output the parent macros
MacroSet::iterator it = parentMacros.begin();
MacroSet::iterator end = parentMacros.end();