Add ifprintversion to quad9/hw_preamble.tex
This lets a homework document be compiled for printing purposes.
Change-Id: I6f23bc16917caf13cf658cb0abe34b013d500799
diff --git a/quad9/hw_preamble.tex b/quad9/hw_preamble.tex
index dfa8f4c..e5522aa 100644
--- a/quad9/hw_preamble.tex
+++ b/quad9/hw_preamble.tex
@@ -68,16 +68,27 @@
\newcommand{\separator}{\noindent\hfil\rule{0.75\textwidth}{0.4pt}\hfil}
+% Versió impresora:
+\newif\ifprintversion
+
\newenvironment{Problem}{%
\stepcounter{problem}%
- \begin{tcolorbox}[colback=cyan!10!white,parbox=false]
+ \ifprintversion
+ \begin{tcolorbox}[colback=white!10!white,parbox=false]
+ \else
+ \begin{tcolorbox}[colback=cyan!10!white,parbox=false]
+ \fi
\textbf{Problema \theproblem.}~%
\setcounter{solution}{0}}{%
\end{tcolorbox}
}
\newenvironment{FreeProblem}{%
- \begin{tcolorbox}[colback=cyan!10!white,parbox=false]
+ \ifprintversion
+ \begin{tcolorbox}[colback=white!10!white,parbox=false]
+ \else
+ \begin{tcolorbox}[colback=cyan!10!white,parbox=false]
+ \fi
\setcounter{solution}{0}}{%
\end{tcolorbox}
}