Only write btUnits if we have a bibliography

Fixes: #11562
This commit is contained in:
Juergen Spitzmueller 2019-04-23 08:58:01 +02:00
parent 89f6de9835
commit b77094a497

View File

@ -12,6 +12,7 @@
#include "output_latex.h"
#include "BiblioInfo.h"
#include "Buffer.h"
#include "BufferParams.h"
#include "Encoding.h"
@ -1436,7 +1437,8 @@ void latexParagraphs(Buffer const & buf,
if (multibib_child && mparams.useBiblatex())
os << "\\newrefsection";
else if (multibib_child && mparams.useBibtopic()) {
else if (multibib_child && mparams.useBibtopic()
&& !buf.masterBibInfo().empty()) {
os << "\\begin{btUnit}\n";
runparams.openbtUnit = true;
}
@ -1546,7 +1548,8 @@ void latexParagraphs(Buffer const & buf,
&& layout.latexname() == bparams.multibib) {
if (runparams.openbtUnit)
os << "\\end{btUnit}\n";
if (!bparams.useBiblatex()) {
if (!bparams.useBiblatex()
&& !buf.masterBibInfo().empty()) {
os << '\n' << "\\begin{btUnit}\n";
runparams.openbtUnit = true;
}