mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Output Preamble code of InPreamble styles before the styles themselves.
This assures that macros are defined. Fixes: #10215
This commit is contained in:
parent
91719d9089
commit
ffacdd8b46
@ -1568,7 +1568,10 @@ docstring const LaTeXFeatures::getTClassPreamble() const
|
||||
list<docstring>::const_iterator cit = usedLayouts_.begin();
|
||||
list<docstring>::const_iterator end = usedLayouts_.end();
|
||||
for (; cit != end; ++cit)
|
||||
tcpreamble << tclass[*cit].preamble();
|
||||
// For InPreamble layouts, we output the preamble stuff earlier
|
||||
// (before the layouts). See Paragraph::Private::validate.
|
||||
if (!tclass[*cit].inpreamble)
|
||||
tcpreamble << tclass[*cit].preamble();
|
||||
|
||||
cit = usedInsetLayouts_.begin();
|
||||
end = usedInsetLayouts_.end();
|
||||
|
@ -1391,6 +1391,7 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
|
||||
// output is wrong if this paragraph contains content
|
||||
// that needs to switch encoding.
|
||||
otexstringstream os;
|
||||
os << layout_->preamble();
|
||||
if (is_command) {
|
||||
os << '\\' << from_ascii(layout_->latexname());
|
||||
// we have to provide all the optional arguments here, even though
|
||||
|
Loading…
Reference in New Issue
Block a user