仅在 alertblock 中修改 labelitem

仅在 alertblock 中修改 labelitem

我想更改项目符号,但仅限于指定区块(alertblock)内。我该怎么做?

\documentclass{beamer}
\begin{document}
\begin{frame}{Example}
  \begin{block}{Block}
    \begin{itemize}
    \item Test
    \end{itemize}
  \end{block}

  \begin{alertblock}{Alertblock}
    \begin{itemize}
    \item Another test
    \end{itemize}
  \end{alertblock}

  \begin{itemize}
  \item Yet another test
  \end{itemize}
\end{frame}
\end{document}

答案1

\documentclass{beamer}

\AtBeginEnvironment{alertblock}{%
    \setbeamertemplate{itemize item}{x}  
}

\begin{document}
\begin{frame}{Example}
  \begin{block}{Block}
    \begin{itemize}
    \item Test
    \end{itemize}
  \end{block}

  \begin{alertblock}{Alertblock}
    \begin{itemize}
    \item Another test
    \end{itemize}
  \end{alertblock}

  \begin{itemize}
  \item Yet another test
  \end{itemize}
\end{frame}
\end{document}

在此处输入图片描述

相关内容