I'm defining a command that should behave differently in handouts vs presentation. Is there a simple way to check that?

Ideally, it should be something like this:

\ifthenelse{[check if handout mode]}{[Behave accordingly]}{[Behave otherwise]}

How can I do this?


Without additional packages, you can use \mode to accordingly define the command:


\mode<beamer|second|trans|article>{\newcommand\mycmd{No H mode}}
\mode<handout>{\newcommand\mycmd{H mode}}




Related to Detect value of option given to documentclass:

  {\newcommand{\printmode}{Handout mode.}}
  {\newcommand{\printmode}{Not-handout mode.}}



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.