我正在使用下面的代码来启动幻灯片中的每个部分,但即使我指定了白色,该部分的文本颜色也是黑色,我怎样才能强制它变成白色?
\AtBeginSection[]
{
\setbeamercolor{background canvas}{fg=white, bg=cbg}
\begin{frame}
\begin{centering}
\usebeamerfont{section title}\insertsection\par
\end{centering}
\end{frame}
\setbeamercolor{background canvas}{fg=black, bg=mbg}
}
答案1
由于我没有您的实际颜色,因此我只是随机选择了颜色。在此之前\insertsection
,您只需\color{<your color>}
按如下方式添加:
\documentclass{beamer}
\usepackage{lmodern,xcolor}
\AtBeginSection{%
\setbeamercolor{background canvas}{fg=white, bg=blue!10}%cbg
\begin{frame}
\begin{centering}
\usebeamerfont{section title}\color{blue!70!green}\insertsection\par
\end{centering}
\end{frame}
\setbeamercolor{background canvas}{fg=black, bg=red!10}%mbg
}
\title{Test Document}
\author{My Name}
\date{}
\begin{document}
\titlepage
\section{Test Section}
\begin{frame}{Test}
Test
\end{frame}
\end{document}