Use a copy of BufferParams

This commit is contained in:
Juergen Spitzmueller 2018-05-05 15:26:58 +02:00
parent a853dab61f
commit c62055458e

View File

@ -476,19 +476,21 @@ Converters::RetVal Converters::convert(Buffer const * buffer,
runparams.flavor = getFlavor(edgepath, buffer); runparams.flavor = getFlavor(edgepath, buffer);
if (buffer) { if (buffer) {
BufferParams const & bp = buffer->params();
runparams.use_japanese = runparams.use_japanese =
(buffer->params().bufferFormat() == "latex" (bp.bufferFormat() == "latex"
|| suffixIs(buffer->params().bufferFormat(), "-ja")) || suffixIs(bp.bufferFormat(), "-ja"))
&& buffer->params().encoding().package() == Encoding::japanese; && bp.encoding().package() == Encoding::japanese;
runparams.use_indices = buffer->params().use_indices; runparams.use_indices = bp.use_indices;
runparams.bibtex_command = buffer->params().bibtexCommand(); runparams.bibtex_command = bp.bibtexCommand();
runparams.index_command = (buffer->params().index_command == "default") ? runparams.index_command = (bp.index_command == "default") ?
string() : buffer->params().index_command; string() : bp.index_command;
runparams.document_language = buffer->params().language->babel(); runparams.document_language = bp.language->babel();
runparams.main_fontenc = buffer->params().main_font_encoding(); // Some macros rely on font encoding
runparams.only_childbibs = !buffer->params().useBiblatex() runparams.main_fontenc = bp.main_font_encoding();
&& !buffer->params().useBibtopic() runparams.only_childbibs = !bp.useBiblatex()
&& buffer->params().multibib == "child"; && !bp.useBibtopic()
&& bp.multibib == "child";
} }
// Some converters (e.g. lilypond) can only output files to the // Some converters (e.g. lilypond) can only output files to the