在比默, 我在用华沙风格。在参考书目中,我使用\newblock
不同类型的条目(作者、标题、期刊等)。我在哪里可以了解颜色关于这些结构的信息(在哪个文件中,在哪一行)?例如,当我在文本中提到作者姓名时,我希望用与在参考书目。
答案1
相关信息可参见10.6 添加参考书目手册beamer
。您正在寻找的相关颜色/模板/字体是
bibliography entry author
bibliography entry title
bibliography entry location
bibliography entry note
如果你想查看参考书目的实际定义,你可以查看文件beamerbaselocalstructure.sty
。例如,在那里可以找到:
\def\beamer@newblock{%
\usebeamercolor[fg]{bibliography entry author}%
\usebeamerfont{bibliography entry author}%
\usebeamertemplate{bibliography entry author}%
\def\newblock{%
\usebeamercolor[fg]{bibliography entry title}%
\usebeamerfont{bibliography entry title}%
\usebeamertemplate{bibliography entry title}%
\def\newblock{%
\usebeamercolor[fg]{bibliography entry location}%
\usebeamerfont{bibliography entry location}%
\usebeamertemplate{bibliography entry location}%
\def\newblock{%
\usebeamercolor[fg]{bibliography entry note}%
\usebeamerfont{bibliography entry note}%
\usebeamertemplate{bibliography entry note}}}}%
\leavevmode\setbox\beamer@tempbox=\hbox{}\ht\beamer@tempbox=1.5em\box\beamer@tempbox}
每个主题都可以根据需要重新定义这些颜色/模板/字体。大多数主题使用默认主题的定义。例如,对于所涉及的颜色,在文件中有beamercolorthemedefault.sty
:
\setbeamercolor{bibliography entry author}{use=structure,fg=structure.fg}
\setbeamercolor{bibliography entry title}{use=normal text,fg=normal text.fg}
\setbeamercolor{bibliography entry location}{use=structure,fg=structure.fg!65!bg}
\setbeamercolor{bibliography entry note}{use=structure,fg=structure.fg!65!bg}
请注意,为了使用这些颜色,您不需要知道确切的颜色定义(模型等)。如果您想使用这些属性,那么您可以使用\usebeamercolor
, \usebeamerfont
;一个小例子:
\documentclass{beamer}
\usetheme{Warsaw}
\begin{document}
\begin{frame}
\frametitle{Bibliography colors}
{\usebeamercolor[fg]{bibliography entry author}
\usebeamerfont{bibliography entry author}Author}
{\usebeamercolor[fg]{bibliography entry title}
\usebeamerfont{bibliography entry title}Title}
{\usebeamercolor[fg]{bibliography entry location}
\usebeamerfont{bibliography entry location}Location}
{\usebeamercolor[fg]{bibliography entry note}%
\usebeamerfont{bibliography entry note}Note}
\begin{thebibliography}{Dijkstra, 1982}
\bibitem[Dijkstra, 1982]{Dijkstra1982}
E.~Dijkstra.
\newblock Smoothsort, an alternative for sorting in situ.
\newblock {Science of Computer Programming}, 1(3):223--233, 1982.
\newblock{London}
\end{thebibliography}
\end{frame}
\end{document}