1

I want to change the font size of bibliography entries in a beamer document. I can choose the color of each part but not its size.

ECM:

\documentclass{beamer}
\usepackage{biblatex}
\usetheme{default}
\addbibresource{biblatex-examples.bib}
\setbeamercolor{bibliography entry title}{fg=blue!50!cyan}
\setbeamercolor{bibliography entry author}{fg=violet}
\setbeamercolor{bibliography entry location}{fg=green}
\setbeamercolor{bibliography entry note}{fg=orange}
\setbeamerfont{bibliography entry title}{size=\footnotesize,series=\bfseries}
\setbeamerfont{bibliography entry author}{size=\footnotesize}
\setbeamerfont{bibliography entry location}{size=\footnotesize}
\setbeamerfont{bibliography entry note}{size=\tiny}
\begin{document}
\nocite{*}
\begin{frame}[allowframebreaks]
  \frametitle{References}
  \printbibliography
\end{frame}
\end{document}

The commands \setbeamerfont{bibliography entry ...}{...} seem to have no effect.

2 Answers 2

1

You could add the font size changes like this:

\documentclass{beamer}
\usepackage{biblatex}
\usetheme{default}
\addbibresource{biblatex-examples.bib}
\setbeamercolor{bibliography entry title}{fg=blue!50!cyan}
\setbeamercolor{bibliography entry author}{fg=violet}
\setbeamercolor{bibliography entry location}{fg=green}
\setbeamercolor{bibliography entry note}{fg=orange}
\setbeamerfont{bibliography entry title}{size=\footnotesize,series=\bfseries}
\setbeamerfont{bibliography entry author}{size=\Tiny}
\setbeamerfont{bibliography entry location}{size=\small}
\setbeamerfont{bibliography entry note}{size=\tiny}

\makeatletter
\AtBeginDocument{%
  \@ifpackageloaded{biblatex}
    {\apptocmd{\blx@env@bibliography}
       {\let\makelabel\beamer@biblabeltemplate}{}{}
     \apptocmd{\abx@macro@begentry}
       {\let\bbx@tempa\@empty%
        \usebeamercolor[fg]{bibliography entry author}\usebeamerfont*{bibliography entry author}}{}{}
     \pretocmd{\abx@macro@labeltitle}
       {\ifboolexpr{ test {\ifcsundef{abx@field@label}}
          and test {\ifcsundef{abx@field@labeltitle}} }{}{\let\bbx@tempa\labelnamepunct}}{}{}
     \pretocmd{\abx@macro@title}
       {\ifcsundef{abx@name@labelname}{}{\let\bbx@tempa\labelnamepunct}%
        \bbx@tempa\newblock\unspace\usebeamercolor[fg]{bibliography entry title}\usebeamerfont*{bibliography entry title}}{}{}
     \apptocmd{\abx@macro@title}
       {\ifcsundef{abx@field@title}{}{\ifpunct{}{\midsentence\newunitpunct}}%
        \newblock\unspace\usebeamercolor[fg]{bibliography entry note}\usebeamerfont*{bibliography entry note}}{}{}}
    {}}
\makeatother

\begin{document}
\nocite{*}
\begin{frame}[allowframebreaks]
  \frametitle{References}
  \printbibliography
\end{frame}
\end{document}

enter image description here


This has been fixed in the beamer development version on github (https://github.com/josephwright/beamer/commit/37faba7407a8af8e7290e3f2f8e76f4809e71146) and should be included in beamer version v3.69 or newer.

2
  • Thanks for this solution (and the patch). How do I set the line spacing used in each entry? Jan 27, 2023 at 12:25
  • @PaulGaborit Setting the font size of the whole bibliography, as shown in Clara's answer, is probably the easiest way to influence the line spacing Jan 27, 2023 at 12:28
1
\renewcommand{\bibfont}{\small}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .