rbrignall / OU-SUPPS

LaTeX class files for OU Supps. If you like this repository, you'll surely also like Robert Hasson's ouunit package: https://github.com/RobertHasson/ouunit Sign up to our mailing list to receive updates: https://www.jiscmail.ac.uk/OU-TEX-ANNOUNCEMENTS
8 stars 4 forks source link

outn/ouexam: output two files from single compilation #90

Closed rbrignall closed 9 months ago

rbrignall commented 9 months ago

The following code:

\ifx\conditionmacro\undefined
  \immediate\write18{%
    pdflatex --jobname="\jobname"
    "\gdef\string\conditionmacro{1}\string\input\space\jobname"
  }%
  \immediate\write18{%
    pdflatex --jobname="\jobname-ss"
    "\gdef\string\conditionmacro{2}\string\input\space\jobname"
  }%
  \expandafter\stop
\fi
\ifnum\conditionmacro=1\relax\fi
\ifnum\conditionmacro=2 \PassOptionsToClass{specsolns}{outn}\fi

placed at the top of a tutornotes tex file has the effect of invoking pdflatex to run twice (providing --shell-escape is passed to pdflatex) and produce both tutornotes and specimen solutions.

Can this be built into outn (and ouexam) so that a command in the tex file such as \outputboth causes this behaviour?

rbrignall commented 9 months ago

Implemented into outn and ouexam.