summaryrefslogtreecommitdiff
path: root/handouts.sty
diff options
context:
space:
mode:
Diffstat (limited to 'handouts.sty')
-rw-r--r--handouts.sty33
1 files changed, 24 insertions, 9 deletions
diff --git a/handouts.sty b/handouts.sty
index 8178b18..9d006ad 100644
--- a/handouts.sty
+++ b/handouts.sty
@@ -1,25 +1,40 @@
-\newif\ifshowpagenrs
-\newif\ifshowsummary
-\newif\ifshowcriticism
+% Define ifsolutions only if it is not defined yet (see Makefile)
+\@ifundefined{ifshowpagenrs}{%
+ \newif\ifshowpagenrs
+ \showpagenrstrue
+}{}
+\@ifundefined{ifshowsummary}{%
+ \newif\ifshowsummary
+ \showsummarytrue
+}{}
+\@ifundefined{ifshownotes}{%
+ \newif\ifshownotes
+ \shownotestrue
+}{}
+\@ifundefined{ifshowcriticism}{%
+ \newif\ifshowcriticism
+ \showcriticismtrue
+}{}
-\showpagenrstrue
-\showsummarytrue
-\showcriticismtrue
+\newcommand{\pagenrStyle}{\small\color{darkgray}}
\newcommand{\criticismStart}{\emph{Criticism:} }
\newcommand{\criticismStyle}{\color{RedOrange}}
+\newcommand{\noteStyle}{\color{gray}}
+
\newcommand{\termStyle}{\it}
\PassOptionsToPackage{dvipsnames}{xcolor}
\RequirePackage{xcolor}
\newcommand{\pagenr}[1]{%
- \ifshowpagenrs\textcolor{gray}{~(p. #1)}\fi}
+ \ifshowpagenrs\begingroup\pagenrStyle\enspace(p. #1)\endgroup\fi}
\newcommand{\summary}[1]{%
\ifshowsummary #1\fi}
+\newcommand{\note}[1]{%
+ \ifshownotes\begingroup\noteStyle\enspace(#1)\endgroup\fi}
\newcommand{\criticism}[1]{%
- \ifshowpagenrs
- \begingroup\criticismStyle\criticismStart{}#1\endgroup\fi}
+ \ifshowcriticism\begingroup\criticismStyle\criticismStart{}#1\endgroup\fi}
\newcommand{\term}[1]{%
\begingroup\termStyle #1\endgroup}