0

I'm bulding up a beamer presentation and an article. Therefore I have to create some figures which are used in both files. So I created an additional .tex file for each figure which I include in every file. This results in errors, because the \pause command shouldnt be used in scrartcl. Is there a solution to ignore these errors or to suppres the \pause command in the scrarctl environment?

If MWE is needed, I'll add one. But I think it's a general problem. Thanks a lot!

percusse
  • 157,807
Phil
  • 359
  • Related: http://tex.stackexchange.com/questions/73/which-document-class-is-being-used – 1010011010 May 21 '15 at 19:29
  • Unfortunately this won't work for me. But I got the idea to use \newcommand{\pause}{ } inside the preamble so that it replaces all \pause by an empty space. But thanks, your Link brought me there! – Phil May 21 '15 at 20:33
  • "Related"... you could patch the command the conditionally use \pause if beamer is loaded. – 1010011010 May 21 '15 at 21:16

2 Answers2

0

I got it my own: Simply ad \newcommand{\pause}{ }inside the preamble to replace all occurences of \pause by a whitespace in the documenet.

Phil
  • 359
  • 2
    \providecommand{\pause}{} would be even more portable for the code. It would work with an existing \pause (e.g beamer class) too. –  May 21 '15 at 20:59
  • 1
    You might notice some extra space when doing this. You could look into using @bsphack and @esphack to fix this if its a problem. It might be fine though in a figure. – Matt May 22 '15 at 04:16
  • 1
    To avoid spacing problems, I'd simply use \let\pause\relax. – Gonzalo Medina Jul 20 '15 at 21:37
  • 1
    @GonzaloMedina Not as convenient as \provide..., though...? – cfr Jul 21 '15 at 02:50
  • @cfr In what sense? – Gonzalo Medina Aug 19 '15 at 22:36
  • @GonzaloMedina Just the reason Christian mentioned: you can put it wherever and not worry about making sure that Beamer doesn't see it. Whether this is an issue or not depends on your workflow and how things are split between files. That's all I meant. – cfr Aug 19 '15 at 22:40
0

You could load beamerarticle. Then you can use whatever commands and environments you like from Beamer. For example:

\documentclass{scrartcl}
\usepackage{beamerarticle}
\usepackage{tikz}
\begin{document}
\begin{frame}
  \begin{tikzpicture}
    \node {Slide 1};
    \pause
    \node [below] {Slide 2};
  \end{tikzpicture}
\end{frame}
\end{document}

I'm not going to post the output because it is completely and utterly uninteresting.

cfr
  • 198,882