![Beamer 子弹标记内部块不同](https://linux22.com/image/305931/Beamer%20%E5%AD%90%E5%BC%B9%E6%A0%87%E8%AE%B0%E5%86%85%E9%83%A8%E5%9D%97%E4%B8%8D%E5%90%8C.png)
我在用
\usetheme{Boadilla}
\usecolortheme{orchid}
\setbeamercolor{itemize item}{fg=white!80!black}
\setbeamercolor{itemize subitem}{fg=white!80!black}
将列表项的项目符号颜色更改为灰色。
然而,这会导致环境中的子弹block
难以看清(灰绿色背景上的灰色子弹)。
有没有办法让 LaTeX 在块环境之外绘制灰色项目符号,并structure
为块内的每个列表绘制彩色项目符号?
答案1
是的,您可以使用etoolbox
包并\AtBeginEnvironment
根据需要在块内设置颜色;一个小例子,改变和的block
颜色exampleblock
:
\documentclass{beamer}
\usecolortheme{orchid}
\usepackage{etoolbox}
\AtBeginEnvironment{block}{
\setbeamercolor{itemize item}{fg=orange!70!black}
\setbeamercolor{itemize subitem}{fg=orange!70!black}
}
\AtBeginEnvironment{exampleblock}{
\setbeamercolor{itemize item}{fg=cyan}
\setbeamercolor{itemize subitem}{fg=cyan}
}
\setbeamercolor{itemize item}{fg=white!80!black}
\setbeamercolor{itemize subitem}{fg=white!80!black}
\begin{document}
\begin{frame}
\begin{columns}
\column{0.5\textwidth}
\begin{itemize}
\item First.
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\item Second.
\end{itemize}
\begin{block}{test block}
\begin{itemize}
\item First.
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\item Second.
\end{itemize}
\end{block}
\column{0.5\textwidth}
\begin{exampleblock}{test example block}
\begin{itemize}
\item First.
\begin{itemize}
\item First.
\item Second.
\end{itemize}
\item Second.
\end{itemize}
\end{exampleblock}
\end{columns}
\end{frame}
\end{document}