From fe858a1d40db3b6ac2f6b22a863f33d65db422f2 Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Wed, 21 Sep 2016 12:27:06 +0200
Subject: Short version in makefile

---
 handouts.sty | 33 ++++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)

(limited to 'handouts.sty')

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}
-- 
cgit v1.2.3

