mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
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:
parent
e335c764b4
commit
9ba76e6c40
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user