Issue with alert and example colors
I was trying to change the example color and ran into a few problems.
-
mwe_title.txt is a minimal working example (MWE) that outputs 2 slides - 1st one is a title and the second one is the slide of interest. This is simply slide 14 (Blocks) from demo.tex. I am attempting to change the color of the
alertedtext and theexampletext. The color of thealertedtext gets changed, but theexampletext remains the same. This seems to be a bug somewhere. See the output: mwe_title.pdf -
mwe_NOtitle.txt is another minimal working example (MWE) where I have commeted out the
\maketitlecommand so that it only outputs 1 slides - theBlocksslide. In this case none of the colors gets changed, not even thealertedthat was getting changed earlier. See the output: mwe_NOtitle.pdf
So, to recap:
-
exampletext color does not change - If there is no
\maketitleno color-changing occurs.
For a practical solution, moving the \setbeamercolor declarations to the preamble seem to fix both problems.
Thank you. Although that does solve the problem, it begs a larger question - should the color declarations be in the body (as in the demo.tex file) or in the preamble? As putting them in the preamble does solve these issues, IMHO the preamble is the right place. If so, then demo.tex and other examples should do that and put a warning about this.
It's my own habit to generally put declarations in the preamble. That said, you are right to report this behaviour as a bug; changing the colours mid-presentation should be possible, and we should keep this issue open until we figure out how to fix it.
Just thought I'd provide a quick work-around until I (or someone else) can find time to delve deeper into Beamer's colour management system and see why this is happening.
It is weird. The beamer colors alerted text and example text need to be used at least once, that the derived colors get updated. So this seems to work fine:
\setbeamercolor{alerted text}{fg=CardinalRed}
\setbeamercolor{example text}{fg=Tangerine}
{
\usebeamercolor[fg]{alerted text}
\usebeamercolor[fg]{example text}
}
...
Looks like a beamer bug.