3

I am using biblatex in a tikzposter, compiling with Overleaf (which I think uses pdflatex).

Here's a minimal working example which shows the issue:

\documentclass{tikzposter}
\usepackage{biblatex}

\addbibresource{bib.bib}

\setlength\bibitemsep{10pt}

\begin{document}

\block{test}{Here's a reference \cite{refa}. And here's another \cite{refb}.
}

\block{}{
        \printbibliography
        \printbibliography
    }

\end{document}

This produces the following output:

screenshot of wrongly-formatted bibliography

The first call to \printbibliography prints the first reference as normal, but then omits numbers from the rest of the references. In the second call, the remaining citation numbers from the previous call are printed (if there are more than two references, the numbers will be printed as [2] [3] [4] etc., all on the same line), and then the bibliography is printed as normal. Note that \setlength\bibitemsep{10pt} also only affects the second call, so this may be a wider formatting issue.

I have found a strange solution to this problem, which I will post as an answer. However, I'm interested in if there's a 'proper' solution.

Is there some bib-related command, or argument to biblatex, that will allow the bibliography to format correctly?

2
  • 1
    See also tex.stackexchange.com/q/243665/35864
    – moewe
    Jul 26 '19 at 13:04
  • @moewe Thanks - somehow I missed both this and the other question that's linked in the comments of that question... That said, I've just given the \mbox{}\vspace{-\baselineskip} command a try, and it only seems to work if both it and the \printbibliography command are inside a center environment, which I'd like to avoid in this case. Nice to see the root cause though.
    – elichad
    Jul 26 '19 at 13:31
2

The strange 'improper' solution

Since I've made a few posters using biblatex and tikzposter where the bibliography has printed as normal, I discovered that using environments such as itemize and center in the poster causes the bibliography to print properly (provided one of those environments appears before the \printbibliography command).

As an example, adding another block containing an itemize:

\documentclass{tikzposter}
\usepackage{biblatex}

\addbibresource{bib.bib}

\setlength\bibitemsep{10pt}

\begin{document}

\block{test}{Here's a reference \cite{refa}. And here's another \cite{refb}.
}

\block{new block}{                 <--- new block containing an itemize environment
    \begin{itemize}               
        \item A test item.        
    \end{itemize}                 
}                                 

\block{}{
        \printbibliography
        \printbibliography
    }

\end{document}

This is the output:

screenshot of correctly-formatted bibliography

Now both calls to \printbibliography behave as expected.

I assume the way in which environments like itemize and center are handled causes some hidden behaviour which allows the bibliography to be printed correctly, but from the user side this is very strange! If anyone knows why this happens, it'd be great to have an explanation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.