1

I'm using Latex and the beamer class for creating a poster. I have to use the authoryear style together with a biblatex bib file, so I have the following in my preamble:

\usepackage[backend=bibtex, style=authoryear]{biblatex}

I then link this to my bib file and try to generate a bibliography with \printbibliography but I keep getting the error

! Undefined control sequence.
\beamer@@tmpl@bibliography item ->\insertbiblabel

l.292 \end{frame}

I found this post which seems to deal with a similar problem but explicitly called \insertbiblabel. I'm not calling \insertbiblabel anywhere in my poster and latex doesn't seem to tell me where the error occurs. In the style file of my poster there's the following call:

% Bibliography
\setbeamertemplate{bibliography item}[text]

if I remove this then the tex file compiles but doesn't have the bibliography style that I need. I have tried adding \setbeamertemplate{bibliography item}{} as suggested in the comments but this produces a bibliography with mismatching indentations:

bibliography example

Here is a minimal example of the code that doesn't work: The poster.tex file:

\documentclass[final]{beamer}

\usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[orientation=portrait,size=a0,scale=1.0]{beamerposter}

\usepackage[backend=bibtex, style=authoryear]{biblatex} \setcounter{biburllcpenalty}{7000} % permit linebreaks at number within URLs in the bibliography, higher value --> higher penalty for these breaks

\bibliography{bibliography.bib}

\title{Some title}

\setbeamertemplate{bibliography item}[text]

\begin{document}

\begin{frame}

This is a test \autocite{AndersonStrongMixedintegerProgramming2020}

\printbibliography

\end{frame}

\end{document}

and the bibliography.bib file:

@article{AndersonStrongMixedintegerProgramming2020,
  title = {Strong Mixed-Integer Programming Formulations for Trained Neural Networks},
  author = {Anderson, Ross and Huchette, Joey and Ma, Will and Tjandraatmadja, Christian and Vielma, Juan Pablo},
  date = {2020-09-01},
  journaltitle = {Mathematical Programming},
  shortjournal = {Math. Program.},
  volume = {183},
  number = {1},
  pages = {3--39},
  issn = {1436-4646},
  doi = {10/gnbscf},
  url = {https://doi.org/10.1007/s10107-020-01474-5},
  urldate = {2021-11-04},
  langid = {english}
}
  • 1
    Welcome to TeX.SX! Please show us an example document (starting with \documentclass and containing a preamble as well as the required dummy content between \begin{document}...\end{document} to reproduce your error with as little code as possible). A simple beamer document with your bibliography setup compiles without any errors for me (https://gist.github.com/moewew/542ee8bf32dd8cf220fe4434639abb8b) so the problem must be specific to code you have not shown us. – moewe Jul 13 '23 at 20:03
  • 1
    Thanks for your answer, I have added a minimal non-working example to my question. I think that \setbeamertemplate{bibliography item}[text] causes the problem but I can't figure out how to replace it – benebrue Jul 14 '23 at 11:28
  • \setbeamertemplate{bibliography item}[text] is pretty much equivalent to the \setbeamertemplate{bibliography item}{\insertbiblabel}. So the Q&A you already linked applies: The line is simply incompatible with your selected style. What exactly don't you like about the bibliography when you remove it? If you dislike the icons, try \setbeamertemplate{bibliography item}{} as suggested in the linked answer. – moewe Jul 14 '23 at 14:51
  • I see, I didn't realise these two commands were equivalent! I have added a screenshot above showing my problems with this, if I remove the icons then the indentation of the first line of a bibitem doesn't match the indentation of the other lines of the item. Is there any way of changing this? – benebrue Jul 14 '23 at 15:47
  • 1
    The different indentation makes it much easier to see the first line of the entry and to parse it. If you change the indentation to be the same in all lines, you only have the much smaller visual effect of the vertical space between entries to separate them. – moewe Jul 14 '23 at 15:54
  • Hm okay after having a second look I kind of agree, removing it would probably make it very hard to read. Thanks for your help! – benebrue Jul 16 '23 at 14:55
  • It's definitely not impossible to remove the indentation (try \appto{\bibsetup}{\setlength{\bibhang}{0pt}}{}{}). But as I said, you probably wouldn't do your readers and favours doing that. – moewe Jul 16 '23 at 20:27

0 Answers0