From c0d9f6494816cb219a217864f73d48a9ec68f471 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 23 Mar 2023 09:51:10 -0700 Subject: [PATCH] added nowarning option --- Misc/Warm-Ups/electician.tex | 3 ++- Misc/Warm-Ups/raid.tex | 3 ++- Misc/Warm-Ups/regex.tex | 3 ++- resources/ormc_handout.cls | 8 +++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Misc/Warm-Ups/electician.tex b/Misc/Warm-Ups/electician.tex index 540a8be..375145d 100755 --- a/Misc/Warm-Ups/electician.tex +++ b/Misc/Warm-Ups/electician.tex @@ -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} diff --git a/Misc/Warm-Ups/raid.tex b/Misc/Warm-Ups/raid.tex index d1eae97..151595f 100755 --- a/Misc/Warm-Ups/raid.tex +++ b/Misc/Warm-Ups/raid.tex @@ -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} diff --git a/Misc/Warm-Ups/regex.tex b/Misc/Warm-Ups/regex.tex index 91de002..06fbeaf 100644 --- a/Misc/Warm-Ups/regex.tex +++ b/Misc/Warm-Ups/regex.tex @@ -1,7 +1,8 @@ % use [nosolutions] flag to hide solutions. % use [solutions] flag to show solutions. \documentclass[ - nosolutions + solutions, + nowarning ]{../../resources/ormc_handout} diff --git a/resources/ormc_handout.cls b/resources/ormc_handout.cls index 33be3b1..9c29f34 100644 --- a/resources/ormc_handout.cls +++ b/resources/ormc_handout.cls @@ -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}