如何更改 beamer 中参考书目条目的字体大小?

如何更改 beamer 中参考书目条目的字体大小?

我想更改beamer文档中参考书目条目的字体大小。我可以选择每个部分的颜色,但不能选择其大小。

发动机控制模块(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}

这些命令\setbeamerfont{bibliography entry ...}{...}似乎没有效果。

答案1

您可以像这样添加字体大小更改:

\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}

在此处输入图片描述


这个问题已在 github 上的 beamer 开发版本中修复(https://github.com/josephwright/beamer/commit/37faba7407a8af8e7290e3f2f8e76f4809e71146) 并且应该包含在 beamer 版本 v3.69 或更新版本中。

答案2

\renewcommand{\bibfont}{\small}

相关内容