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 [nosolutions] flag to hide solutions.
% use [solutions] flag to show solutions. % use [solutions] flag to show solutions.
\documentclass[ \documentclass[
nosolutions, solutions,
nowarning,
singlenumbering, singlenumbering,
nopagenumber nopagenumber
]{../../resources/ormc_handout} ]{../../resources/ormc_handout}

View File

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

View File

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

View File

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