1
\documentclass{article}
\usepackage{beamerarticle}
\begin{document}
\textcolor<3->{red}{Some text}
\end{document}

The previous code compiles fine thanks to the beamerarticle package. However, I do not only want it to compile but also to completely disable the overlay effect: in this case I want the text to stay black (as it is in the first two frames) when printed into an article.

Is this possible?

Edit. My use-case is the following: I have a collection of problems typeset in LaTeX that I use both as content for beamer slides and as source for printed material. Each problem is in his custom file, so I have something like:

\documentclass{beamer}
\usepackage{mybeamertheme}
\begin{document}
\mycustomimportcommand{problem1}
\mycustomimportcommand{problem4}
...
\end{document}  

And then on another file:

\documentclass{article}
\usepackage{mycustomarticleformatting}
\usepackage{beamerarticle}
\begin{document}
\mycustomimportcommand{problem1}
\mycustomimportcommand{problem4}
...
\end{document}

Since the problems are typeset for a presentation, the code is filled with overlay specs: \pause, \only, etc. that I want to be ignored when I'm importing the code into articles.

This works fine except when there are overlay aware macros as shown in the MWE.

  • Welcome to TeX.SX! Why do you want to use beamerarticle at all? – user31729 Aug 13 '14 at 10:54
  • @ChristianHupfer because I'm importing code from a beamer presentation, full of overlay specs that of course I do not want when printing an article. – RbW Aug 13 '14 at 10:56
  • You should add that information to your post – user31729 Aug 13 '14 at 11:00
  • @ChristianHupfer I thought it was obvious, will do it, thanks – RbW Aug 13 '14 at 11:01
2

I think that the problem is not with the overlay specification but with \textcolor command. When used inside a beamerarcicle, command \textcolor<1->{red}{Some text} is converted to \textcolor{red}{Some text} and Some text is written in red color.

I can think in two solutions, the first one would be to use

\mode<article>{Some text}\mode<beamer>{\textcolor<1->{red}{Some text}}

but I imagin this is too much work.

A second workarround could be to redefine all your colors to black when beamerarticle is used:

\documentclass{article}
\usepackage{beamerarticle}
\mode<article>
{
    \colorlet{red}{black}
}
\begin{document}
\begin{frame}
\textcolor<2->{red}{Some text}
\end{frame}
\end{document}
0

I found a workaround:

\documentclass{article}
\usepackage{beamerarticle}
\renewcommand<>{\textcolor}[2]{\iffalse#1\fi#2}
\begin{document}
\textcolor<3->{red}{Some text}
\end{document}

However this is a sub-optimal solution since I still have to redefine each overlay aware macro, would still be nice to have a more general/simple solution

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.