![更改标题的字体颜色](https://linux22.com/image/305803/%E6%9B%B4%E6%94%B9%E6%A0%87%E9%A2%98%E7%9A%84%E5%AD%97%E4%BD%93%E9%A2%9C%E8%89%B2.png)
我想知道如何更改演示文稿标题的字体颜色吗?
我看见这里如何改变栏的颜色但不改变实际字体。
原始代码:
\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{CambridgeUS}
\useinnertheme{rectangles}
\useoutertheme{infolines}
\setbeamercolor{frametitle}{fg=Brown,bg=Brown!20}
\setbeamercolor{section in head/foot}{bg=Brown}
\setbeamercolor{author in head/foot}{bg=Brown}
\setbeamercolor{date in head/foot}{fg=Brown}
\begin{document}
\section{Font to be changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\end{document}
编辑:回答之后,以下内容似乎对我不起作用
\documentclass[xcolor=dvipsnames]{beamer}
\mode<presentation>
{
\usetheme{AnnArbor}
\setbeamercovered{transparent}
\useinnertheme{rounded}
\usecolortheme{spruce}
}
\setbeamercolor{section in head/foot}{fg=White}
\begin{document}
\section{Font to be changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\end{document}
我想保持主题原样,只想将标题的字体改为白色,否则难以阅读。
谢谢。
答案1
为适当的颜色模板添加fg
(前景)规范;例如:
\setbeamercolor{section in head/foot}{bg=Brown,fg=red}
\setbeamercolor{subsection in head/foot}{bg=gray!30,fg=black}
完整示例:
\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{CambridgeUS}
\useinnertheme{rectangles}
\useoutertheme{infolines}
\setbeamercolor{frametitle}{fg=Brown,bg=Brown!20}
\setbeamercolor{section in head/foot}{bg=Brown,fg=red}
\setbeamercolor{subsection in head/foot}{bg=gray!30,fg=black}
\setbeamercolor{author in head/foot}{bg=Brown}
\setbeamercolor{date in head/foot}{fg=Brown}
\begin{document}
\section{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\subsection{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\section{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\subsection{Font changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\end{document}
最终的标题是:
更新
在对问题进行编辑后,
\documentclass[xcolor=dvipsnames]{beamer}
\mode<presentation>
{
\usetheme{AnnArbor}
\setbeamercovered{transparent}
\useinnertheme{rounded}
\usecolortheme{spruce}
}
\setbeamercolor{section in head/foot}{fg=White}
\begin{document}
\section{Font to be changed in the headline}
\begin{frame}
\frametitle{A test frame}
\end{frame}
\end{document}
生产