runparams.use_japanese = features.isRequired("japanese");
- if (!output_body)
+ if (!output_body) {
+ // Restore the parenthood if needed
+ if (!runparams.is_child)
+ d->ignore_parent = false;
return;
+ }
// make the body.
os << "\\begin{document}\n";
void Buffer::getSourceCode(odocstream & os, string const format,
pit_type par_begin, pit_type par_end,
- OutputWhat output) const
+ OutputWhat output, bool master) const
{
OutputParams runparams(¶ms().encoding());
runparams.nice = true;
// child of some other buffer, let's cut the link here,
// so that no concurring settings from the master
// (e.g. branch state) interfere (see #8101).
- // FIXME: Add an optional "from master" perspective.
- d->ignore_parent = true;
+ if (!master)
+ d->ignore_parent = true;
// We need to validate the Buffer params' features here
// in order to know if we should output polyglossia
// macros (instead of babel macros)
latexParagraphs(*this, text(), ots, runparams);
// Restore the parenthood
- d->ignore_parent = false;
+ if (!master)
+ d->ignore_parent = false;
}
} else {
os << "% ";
d->texrow.newline();
d->texrow.newline();
otexstream ots(os, d->texrow);
+ if (master)
+ runparams.is_child = true;
writeLaTeXSource(ots, string(), runparams, output);
}
}