diff --git a/resources/ormc_handout.cls b/resources/ormc_handout.cls index d630a79..90abab8 100644 --- a/resources/ormc_handout.cls +++ b/resources/ormc_handout.cls @@ -1,3 +1,8 @@ +% Mark's handout style. +% +% Source is at https://git.betalupi.com/Mark/ormc-handouts + + \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ormc_handout}[2022/05/07 1.1.0 ORMC Handout] @@ -16,11 +21,16 @@ \newif{\ifnopagenumber} \nopagenumberfalse +% Boolean. If true, show a smaller solutions warning +\newif{\ifshortwarning} +\shortwarningfalse + % Declare and parse arguments \DeclareOption{solutions}{\solutionstrue} \DeclareOption{nosolutions}{\solutionsfalse} \DeclareOption{singlenumbering}{\singlenumberingtrue} \DeclareOption{nopagenumber}{\nopagenumbertrue} +\DeclareOption{shortwarning}{\shortwarningtrue} \DeclareOption*{\ClassWarning{ormc_handout}{\CurrentOption ignored}} \ProcessOptions\relax @@ -160,24 +170,41 @@ % Instructor's handout warning \ifsolutions - \begin{tcolorbox}[ - colback=white, - colframe=red - ] - \begin{center} - \large - \textcolor{red}{ - \textbf{Instructor's Handout} - } \\ - \normalsize - \end{center} + % Short warning + \ifshortwarning + \begin{tcolorbox}[ + colback=white, + colframe=red + ] + \begin{center} + \large + \textcolor{red}{ + \textbf{Instructor's Handout} + } \\ + \normalsize + \end{center} + \end{tcolorbox} + \else + % Regular warning + \begin{tcolorbox}[ + colback=white, + colframe=red + ] + \begin{center} + \large + \textcolor{red}{ + \textbf{Instructor's Handout} + } \\ + \normalsize + \end{center} - \vspace{1ex} + \vspace{1ex} - \textcolor{red}{This file contains solutions and notes.} + \textcolor{red}{This file contains solutions and notes.} - \textcolor{red}{Compile with the ``nosolutions'' flag before distributing.} - \end{tcolorbox} + \textcolor{red}{Compile with the ``nosolutions'' flag before distributing.} + \end{tcolorbox} + \fi \fi \end{center}