When defining the color of the text in a textblock
environment (i.e. from textpos
package), then the color of the text of the next frame is changed to that color too.
In the example below (compiled with lualatex), the text "n°1" is set to Gray
, and in the next frame, the normal text ("Answers!") is Gray
too.
Code:
\documentclass[20pt, xcolor={usenames, dvipsnames}]{beamer}
\usepackage[overlay,absolute]{textpos}
\begin{document}
\begin{frame}
\begin{center}
\begin{textblock}{1}(0.5,0.5)\color{Gray}{n°1}\end{textblock}
$ \text{5}\times \text{9} $ = \color{BrickRed}{?}
\end{center}
\end{frame}
\begin{frame}
\begin{center}
Answers!
\end{center}
\end{frame}
\begin{frame}
\begin{center}
\begin{textblock}{1}(0.5,0.5)\color{Gray}{n°1}\end{textblock}
\only<1>{$ \text{5}\times \text{9} $ = \color{BrickRed}{?}}
\only<2>{$ \text{5}\times \text{9} $ = \color{OliveGreen}{\text{45}}}
\end{center}
\end{frame}
\end{document}
I know a very simple workaround consists of wrapping "Answers!": color{Black}{Answers!}
but:
I am not sure whether this is a normal behaviour (hence the cause is my document is badly written) or if it is a clash between packages (textpos documentation mentions such a clash but the workarounds it gives are not meant for
lualatex
or are about other commands that I do not use, like\pagecolor
; nevertheless trying the mentionned tricks withlualatex
did not work (same result)). Also, I tried in vain to add:\setbeamercolor{normal text}{fg=black,bg=white}
before\begin{document}
.As the document is to be created automatically, I'd prefer to avoid adding such a workaround, if possible
So, is there anything to do (better than my workaround) to get the text of next frame in the normal color (here, black)? If possible, the answer should not use any other package (to limit the risk of other packages clash(es)).