5
\documentclass{beamer}
\renewcommand\pause{}
\begin{document}
\begin{frame}
a
\pause
b
\end{frame}
\end{document}

Expected output: a single page with "a b" in it. Actual result: LaTeX Error: Command \pause undefined. Why, and how to accomplish the expected result?

6
  • Is there something stopping you from globally commenting out all instances of \pause?
    – Mico
    Commented Mar 30, 2022 at 18:25
  • Probably some conflict. Try \zzpause or something unique. (generally speaking, redefining built-in things in LaTeX won't end well...)
    – user202729
    Commented Mar 30, 2022 at 18:25
  • \AtBeginDocument{\let\pause\empty} does the trick, while interestingly, \let\pause\empty in the preamble does not.
    – marquinho
    Commented Mar 30, 2022 at 18:28
  • @Mico No, but it would be neater if could just have a single line controlling this. Commented Mar 30, 2022 at 18:28
  • 4
    @Carlaonlyprovestrivialprop As \pause is a core part of beamer, I am wondering what the wider context is here
    – Joseph Wright
    Commented Mar 30, 2022 at 18:34

1 Answer 1

10

The \pause command appears to be defined with a delay, i.e., not until the end of the preamble is reached. Hence, what you need is

\AtBeginDocument{\renewcommand\pause{}} % redefine the command to do nothing

Incidentally,

\AtBeginDocument{\let\pause\relax} % "stop whatever you're doing right now"

works too.

With either of these adjustments, your code generates "a b" as expected.

\documentclass{beamer}
\AtBeginDocument{\renewcommand\pause{}}
\begin{document}
\begin{frame}
a
\pause
b
\end{frame}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .