Here is a hypothetical scenario. I want to make a beamer presentation and a handout for that presentation. I start my file as follows:
\newif\ifhandout
\handouttrue
\ifhandout
\PassOptionsToClass{handout}{beamer}
\fi
\documentclass{beamer}
\ifhandout
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,landscape,border shrink=5mm]
\fi
Now, what I'd like to add to this conditional-fu is a command that tells LaTeX to compile to handout-\jobname.pdf
if the relevant statement is true. Is this sort of thing possible, or can I only do this from the command line?
I've not added the beamer tag because this is not a question about beamer. I couldn't think of any other tags that this might fall under.
.tex
file. And the answers to that question don't answer my question. Indeed, I answered that other question... So I don't think it's a duplicate.