Added short warning

This commit is contained in:
Mark 2023-03-01 09:04:12 -08:00
parent b7115e124d
commit 3ed40abc11

View File

@ -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,6 +170,22 @@
% Instructor's handout warning
\ifsolutions
% 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
@ -179,6 +205,7 @@
\textcolor{red}{Compile with the ``nosolutions'' flag before distributing.}
\end{tcolorbox}
\fi
\fi
\end{center}
\end{adjustbox}