基本上,我正在尝试改变 beamer 中块环境中枚举项、子项和子子项的前景色。
在以下文件中,该行
\AtBeginEnvironment{block}{\setbeamercolor{enumerate item}{fg=esi-green}}
和他们的朋友们* 应该 *让它工作。除了,他们不...请注意,影响块内项目内项目前景的线条工作正常。老实说,我没主意了。问题很可能出在“颜色主题”代码示例中,但我不知道它到底在哪里,也不知道我做错了什么。
颜色主题
\usepackage{etoolbox}
\mode<presentation>
\definecolor{esi-red}{RGB}{176, 14, 43}
\definecolor{esi-blue}{RGB}{73, 143, 200}
\definecolor{esi-green}{RGB}{0, 166, 80}
\setbeamercolor{alerted text}{fg=esi-red}
\setbeamercolor{example text}{fg=esi-blue}
\AtBeginEnvironment{block}{\setbeamercolor{itemize item}{fg=esi-green}}
\AtBeginEnvironment{block}{\setbeamercolor{itemize subitem}{fg=esi-green}}
\AtBeginEnvironment{block}{\setbeamercolor{itemize subsubitem}{fg=esi-green}}
\AtBeginEnvironment{block}{\setbeamercolor{enumerate item}{fg=esi-green}}
\AtBeginEnvironment{block}{\setbeamercolor{enumerate subitem}{fg=esi-green}}
\AtBeginEnvironment{block}{\setbeamercolor{enumerate subsubitem}{fg=esi-green}}
\setbeamercolor*{palette primary}{fg=black, bg=esi-blue}
\setbeamercolor*{palette secondary}{fg=black, bg=esi-blue}
\setbeamercolor*{palette tertiary}{fg=esi-blue!30, bg=esi-red!80!black}
\setbeamercolor*{palette quaternary}{fg=black, bg=esi-blue!15}
\setbeamercolor*{upper separation line head left}{parent=palette tertiary}
\setbeamercolor*{upper separation line head right}{parent=palette primary}
\setbeamercolor{title}{fg=esi-red}
%\setbeamercolor*{titlelike}{fg=esi-red}
\setbeamercolor{frametitle}{fg=esi-red, bg=white}
\setbeamercolor{frametitle right}{bg=yellow!60!orange}
\setbeamercolor{structure}{fg=esi-blue}
\setbeamercolor{block title}{fg=white, bg=esi-green}
\setbeamercolor{block body}{fg=black, bg=esi-green!15}
\setbeamercolor{block title example}{fg=white, bg=esi-blue}
\setbeamercolor{block body example}{fg=black, bg=esi-blue!15}
\setbeamercolor{block title alerted}{fg=white, bg=esi-red}
\setbeamercolor{block body alerted}{fg=black, bg=esi-red!10}
\setbeamercolor*{separation line}{}
\setbeamercolor*{fine separation line}{}
\setbeamercolor*{sidebar}{fg=esi-red,bg=orange!75!white}
\setbeamercolor*{sidebar}{fg=esi-red,bg=orange!75!white}
\setbeamercolor*{palette sidebar primary}{fg=esi-red!10!black}
\setbeamercolor*{palette sidebar secondary}{fg=white}
\setbeamercolor*{palette sidebar tertiary}{fg=esi-red!50!black}
\setbeamercolor*{palette sidebar quaternary}{fg=yellow!10!orange}
\mode<all>
外部主题
\newif\ifbeamer@ESI@navigation
\beamer@ESI@navigationfalse
\DeclareOptionBeamer{navigation}[true]{%
\csname beamer@ESI@navigation#1\endcsname}
\ProcessOptionsBeamer
\mode<presentation>
\setbeamercolor*{author in head/foot}{parent=palette tertiary}
\setbeamercolor*{title in head/foot}{parent=palette secondary}
\setbeamercolor*{date in head/foot}{parent=palette primary}
\setbeamercolor*{section in head/foot}{parent=palette quaternary}
\setbeamercolor*{subsection in head/foot}{parent=palette primary}
\defbeamertemplate*{footline}{ESI theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.25\paperwidth,ht=2.25ex,dp=1ex,center]{%
author in head/foot}%
\usebeamerfont{author in head/foot}%
\insertshortauthor~~\insertshortinstitute
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.45\paperwidth,ht=2.25ex,dp=1ex,center]{%
title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.30\paperwidth,ht=2.25ex,dp=1ex,right]{%
date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\defbeamertemplate*{headline}{ESI theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.25\paperwidth,ht=1ex,dp=0ex]{%
upper separation line head left}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.75\paperwidth,ht=1ex,dp=0ex]{%
upper separation line head right}%
\end{beamercolorbox}}%
\vskip0pt
\ifbeamer@ESI@navigation
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}%
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertnavigation{\paperwidth}\vskip2pt
\end{beamercolorbox}%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}%
\fi
}
\setbeamersize{text margin left=1em,text margin right=1em}
主题
\mode<presentation>
\def\beamer@themeESI@navigation{}
\DeclareOptionBeamer{navigation}[true]{%
\def\beamer@themeESI@navigation{#1}}
\ProcessOptionsBeamer
\useinnertheme{rectangles}
\usecolortheme{ESI}
\useoutertheme[navigation=\beamer@themeESI@navigation]{ESI}
\mode<all>
文档
\documentclass{beamer}
\mode<presentation>
\setbeamertemplate{footline}[frame number]
\setbeamercovered{transparent}
\usetheme{ESI}
\setbeamertemplate{frametitlecontinuation} {\insertcontinuationcount}
\begin{document}
\begin{frame}
\begin{block}
\begin{enumerate}
\item Level 1
\begin{enumerate}
\item Level 2
\begin{enumerate}
\item Level 3
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{block}
\end{frame}
\end{document}
谢谢您的回答。
答案1
说实话,我不明白其中的逻辑,但方形枚举模板使用了颜色item projected
。如果您将其添加到颜色主题中,则可以更改枚举项。
\documentclass{beamer}
\mode<presentation>
\setbeamertemplate{footline}[frame number]
\setbeamercovered{transparent}
\usetheme{ESI}
\setbeamertemplate{frametitlecontinuation} {\insertcontinuationcount}
\AtBeginEnvironment{block}{%
\setbeamercolor{itemize item}{fg=esi-green}
\setbeamercolor{itemize subitem}{fg=esi-green}
\setbeamercolor{itemize subsubitem}{fg=esi-green}
\setbeamercolor{enumerate item}{fg=esi-green, bg=red}
\setbeamercolor{enumerate subitem}{fg=esi-green}
\setbeamercolor{enumerate subsubitem}{fg=esi-green}
\setbeamercolor{item projected}{fg=white, bg=esi-green}
}
\begin{document}
\begin{frame}
\begin{block}{titel}
\begin{enumerate}
\item Level 1
\begin{enumerate}
\item Level 2
\begin{enumerate}
\item Level 3
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{block}
\end{frame}
\end{document}