summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex')
-rw-r--r--Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex60
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex
new file mode 100644
index 00000000000..334275140ab
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-199360.tex
@@ -0,0 +1,60 @@
+% http://tex.stackexchange.com/a/199360/
+\documentclass{scrartcl}
+\usepackage[clear-aux]{xsim}
+
+\usepackage{tcolorbox,blindtext}
+
+\DeclareExerciseEnvironmentTemplate{custom}
+ {%
+ \begin{tcolorbox}[
+ width = \textwidth ,
+ colbacktitle = \IfInsideSolutionTF{green}{red} ,
+ coltitle = black ,
+ title = {\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}]}
+ {\end{tcolorbox}}
+
+\xsimsetup{
+ exercise/template = custom ,
+ solution/template = custom
+}
+
+\begin{document}
+
+\begin{exercise}
+ First Question
+\end{exercise}
+\begin{solution}
+ Yes, it's a question
+\end{solution}
+
+\begin{exercise}[print=false,use]
+ Question: What is special about Brontosaurs?
+\end{exercise}
+\begin{solution}
+ They are thin at one end, thick in the middle and thin on the end again
+\end{solution}
+
+\begin{exercise}
+ Proof
+\begin{equation}
+ a^2 + b^2 = c^2
+\end{equation}
+\end{exercise}
+\begin{solution}
+ to be done
+\end{solution}
+
+\begin{exercise}
+ Cite a Latin Text
+\end{exercise}
+\begin{solution}
+ \textcolor{blue}{\blindtext}
+\end{solution}
+
+\begin{exercise}
+ \textcolor{red}{\textbf{Cite a Latin text again}}
+\end{exercise}
+
+\printsolutions*
+
+\end{document}