added nowarning option

This commit is contained in:
Mark 2023-03-23 09:51:10 -07:00
parent 36ee2e72ea
commit c0d9f64948
4 changed files with 13 additions and 4 deletions

View File

@ -1,7 +1,8 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
nosolutions,
solutions,
nowarning,
singlenumbering,
nopagenumber
]{../../resources/ormc_handout}

View File

@ -1,7 +1,8 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
nosolutions,
solutions,
nowarning,
singlenumbering,
nopagenumber
]{../../resources/ormc_handout}

View File

@ -1,7 +1,8 @@
% use [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions.
\documentclass[
nosolutions
solutions,
nowarning
]{../../resources/ormc_handout}

View File

@ -25,12 +25,17 @@
\newif{\ifshortwarning}
\shortwarningfalse
% Boolean. If true, do not show solution warning
\newif{\ifnowarning}
\nowarningfalse
% Declare and parse arguments
\DeclareOption{solutions}{\solutionstrue}
\DeclareOption{nosolutions}{\solutionsfalse}
\DeclareOption{singlenumbering}{\singlenumberingtrue}
\DeclareOption{nopagenumber}{\nopagenumbertrue}
\DeclareOption{shortwarning}{\shortwarningtrue}
\DeclareOption{nowarning}{\nowarningtrue}
\DeclareOption*{\ClassWarning{ormc_handout}{\CurrentOption ignored}}
\ProcessOptions\relax
@ -166,6 +171,7 @@
\rule{\linewidth}{0.2mm} \\
% Instructor's handout warning
\ifnowarning\else
\ifsolutions
% Short warning
\ifshortwarning
@ -202,7 +208,7 @@
\textcolor{red}{Compile with the ``nosolutions'' flag before distributing.}
\end{tcolorbox}
\fi
\fi
\fi\fi
\end{center}
\end{adjustbox}