I'm trying to redefine the block
environment in beamer
so that the itemize
/enumerate
bullets follow the color of block title
instead of structure
:
\documentclass{beamer}
\renewenvironment<>{block}[1]{%
\begin{actionenv}#2%
\def\insertblocktitle{#1}%
\par%
\mode<presentation>{%
\setbeamercolor{local structure}{use=block title,%
fg=block title.bg}}%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}}
But this immediately throws the error
ERROR: LaTeX Error: Command \beamerx@\block already defined.
This seems very similar to the problem discussed at: How to redefine the \emph command in Beamer?
The aforementioned thread culminated in the discovery of a bug in beamer which was patched 4 years ago, and I'm wondering if this might be a similar bug in beamer's renewenvironment.
Best Answer
Yes, this seems to be also a similar bug with
\newenvironment
inbeamer
. The problem is the same mentioned by Loop Space inhis answer
to How to redefine the \emph command in Beamer?. The problem seems to be the same mentioned in the linked answer and the "solution" is similar.Below, I replaced
\newcommand
by\renewcommand
in two places in the definition of\beamer@newenvnoopt
(original definition in the filebeamerbaselocalstructure.sty
); the places were the change were made were marked%<- here
.Please, use at your own risk.
I've contacted one of the
beamer
maintainers about this.