void latexParagraphs(Buffer const & buf,
Text const & text,
otexstream & os,
- OutputParams const & runparams_in,
+ OutputParams const & runparams,
string const & everypar)
{
- OutputParams runparams = runparams_in;
LASSERT(runparams.par_begin <= runparams.par_end,
{ os << "% LaTeX Output Error\n"; return; } );
BufferParams const & bparams = buf.params();
+ BufferParams const & mparams = buf.masterParams();
bool const maintext = text.isMainText();
bool const is_child = buf.masterBuffer() != &buf;
+ bool const multibib_child = maintext && is_child
+ && mparams.multibib == "child";
+
+ if (multibib_child && mparams.useBiblatex())
+ os << "\\newrefsection";
+ else if (multibib_child && mparams.useBibtopic()) {
+ os << "\\begin{btUnit}\n";
+ runparams.openbtUnit = true;
+ }
// Open a CJK environment at the beginning of the main buffer
// if the document's language is a CJK language
}
}
- if (runparams.openbtUnit)
+ if (maintext && !is_child && runparams.openbtUnit)
os << "\\end{btUnit}\n";
// if "auto end" is switched off, explicitly close the language at the end
if (state->cjk_inherited_ == 0)
state->open_encoding_ = CJK;
}
+
+ if (multibib_child && mparams.useBibtopic()) {
+ os << "\\end{btUnit}\n";
+ runparams.openbtUnit = false;
+ }
}