mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
* Fix latex output of child documents when rendered alone.
Problem: Before macro redefinitions in a child buffer did not see the parent original definition because an Buffer::updateMacros() call had updated the redefinition_ flag to "false" after the parent buffer had temporarely been set to =0 for latex output of the child. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22656 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
135fbe2c1b
commit
76cbbc2fb4
@ -1128,9 +1128,15 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
|
||||
LYXERR(Debug::INFO, "preamble finished, now the body.");
|
||||
|
||||
// load children, if not already done.
|
||||
// This includes an updateMacro() call.
|
||||
// Don't move this behind the parent_buffer=0 code below,
|
||||
// because then the macros will not get the right "redefinition"
|
||||
// flag as they don't see the parent macros which are output before.
|
||||
loadChildDocuments();
|
||||
|
||||
// fold macros if possible, still with parent buffer as the
|
||||
// macros will be put in the prefix anyway.
|
||||
updateMacros();
|
||||
updateMacroInstances();
|
||||
|
||||
// if we are doing a real file with body, even if this is the
|
||||
@ -1145,8 +1151,6 @@ void Buffer::writeLaTeXSource(odocstream & os,
|
||||
d->parent_buffer = 0;
|
||||
}
|
||||
|
||||
loadChildDocuments();
|
||||
|
||||
// the real stuff
|
||||
latexParagraphs(*this, paragraphs(), os, d->texrow, runparams);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user