5

I have been trying to figure out why isn't the text color in a titleless tcolorbox frame rendered black in some cases in a beamer presentation. This occurs only with certain themes (Madrid, Ilmenau, Copenahagen, ...).

Consider the following MWE:

\documentclass{beamer}
\usetheme{Copenhagen}
\usepackage{tcolorbox}
\begin{document}
\title{Title}
\author{Author}
\date{\today}
\frame{\titlepage}
\begin{frame}
  \begin{tcolorbox}
    This is a text that should have been black.
  \end{tcolorbox}
\end{frame}
\end{document}

The second slide is rendered thus:

enter image description here

However, if I add a title to the tcolorbox frame, the text color turns out black. Also, and strangely enough, if I remove the presentation's titlepage, the text color is also rendered black. Like so:

\documentclass{beamer}
\usetheme{Copenhagen}
\usepackage{tcolorbox}
\begin{document}
\begin{frame}
  \begin{tcolorbox}
    This is a text that should have been black.
  \end{tcolorbox}
\end{frame}
\end{document}

Which is rendered:

enter image description here

Any ideas as to what might be going on in here?

  • 2
    The white color seems to leak out from block with the title. But I'm not quite sure if it is a bug or an incompability -- after all the color box of beamer works fine and beamer needs some special code to transport colors between slides. You can reset the color with \normalcolor in the tcolorbox. – Ulrike Fischer Jan 25 '17 at 8:41
  • 1
    I think, the problem are the rounded beamer boxes. I recently saw a question where the first of two columns vanished after a beamercolorbox , but unfortunately I cannot find this question anymore – user36296 Jan 25 '17 at 19:19
  • 1
    See github.com/josephwright/beamer/issues/363 Sounds like it is fixed in the latest version, can you try to update? – user36296 Jan 25 '17 at 19:23
5

This behaviour is due to a bug in beamer which is fixed in the v3.41 release. Where possible, you should update your TeX distribution to install the current release. If this is not possible, for example if you want to change only this one package or where you do not have the privileges to update the entire distribution, you will need to install the package locally. This option should be considered a last resort, since for more complex packages there may be package dependencies that will make local installation more complicated and error-prone.

As a temporary workaround, until this version is available from ctan, you can place the two files

https://raw.githubusercontent.com/josephwright/beamer/d8541c78ed3744501f515de46dab8373e41991ea/base/beamerbaseoverlay.sty https://raw.githubusercontent.com/josephwright/beamer/d8541c78ed3744501f515de46dab8373e41991ea/base/beamerbasecolor.sty

in the folder of your .tex file and your text is black again

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.