summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xsim/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-01 03:00:47 +0000
committerNorbert Preining <norbert@preining.info>2021-02-01 03:00:47 +0000
commit87c74b3292e1c3efc4427ae0536a1d30a0dc8e4b (patch)
tree219447f0cb875a4889a8cac2bea6deb012b7ca7b /macros/latex/contrib/xsim/examples
parent8eab566745f1c61319c17e6a1aeea0f18bcfc34c (diff)
CTAN sync 202102010300
Diffstat (limited to 'macros/latex/contrib/xsim/examples')
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.blanks.pdf230
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.blanks.tex22
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.boxed-headings.pdfbin0 -> 38372 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.boxed-headings.tex30
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.code-and-output.pdfbin0 -> 30939 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.code-and-output.tex53
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.collections.pdfbin0 -> 30259 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.collections.tex44
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.crossref.pdfbin0 -> 38748 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.crossref.tex60
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.description-list.pdfbin0 -> 41171 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.description-list.tex42
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.different-point-types.pdfbin0 -> 42156 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.different-point-types.tex52
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.difficulties.pdfbin0 -> 31763 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.difficulties.tex53
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.floating.pdfbin0 -> 37717 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.floating.tex50
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.golatex-80640.pdfbin0 -> 46317 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.golatex-80640.tex130
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.golatex-91339.pdfbin0 -> 64956 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.golatex-91339.tex93
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.grade-distribution.pdfbin0 -> 23204 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.grade-distribution.tex56
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.hints.pdfbin0 -> 45722 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.hints.tex54
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.issues-49.pdfbin0 -> 95608 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.issues-49.tex122
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.listings.pdfbin0 -> 45747 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.listings.tex48
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.listofexercises.pdfbin0 -> 57220 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.listofexercises.tex81
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.multiplechoice.pdfbin0 -> 31019 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.multiplechoice.tex70
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.pointsums.pdfbin0 -> 28126 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.pointsums.tex30
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.randomexercises.pdfbin0 -> 23048 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.randomexercises.tex50
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-13635.pdfbin0 -> 86049 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-13635.tex72
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-155630.pdfbin0 -> 20048 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-155630.tex25
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-199360.pdfbin0 -> 56106 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-199360.tex60
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-299534.pdfbin0 -> 48095 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-299534.tex32
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-305110.pdfbin0 -> 36974 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-305110.tex67
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-308883.pdfbin0 -> 27157 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-308883.tex13
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-338165.pdfbin0 -> 56911 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-338165.tex68
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-350028.pdfbin0 -> 130588 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-350028.tex130
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-369065.pdfbin0 -> 65714 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-369065.tex73
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-369636.pdfbin0 -> 91296 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-369636.tex43
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-369803.pdfbin0 -> 55077 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-369803.tex46
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-370642.pdfbin0 -> 28428 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-370642.tex25
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-391530-exercises.tex12
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-391530.pdfbin0 -> 26102 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-391530.tex56
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-395273.pdfbin0 -> 50575 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-395273.tex74
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-466584.pdfbin0 -> 60453 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-466584.tex56
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-498299.pdfbin0 -> 42514 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-498299.tex76
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-576998.pdfbin0 -> 49333 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-576998.tex135
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-580636.pdfbin0 -> 51800 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texsx-580636.tex92
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texwelt-15093.pdfbin0 -> 36259 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texwelt-15093.tex132
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texwelt-23968.pdfbin0 -> 46009 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texwelt-23968.tex65
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texwelt-6698.pdfbin0 -> 43907 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.texwelt-6698.tex85
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.various.pdfbin0 -> 86588 bytes
-rw-r--r--macros/latex/contrib/xsim/examples/xsim.various.tex238
83 files changed, 3045 insertions, 0 deletions
diff --git a/macros/latex/contrib/xsim/examples/xsim.blanks.pdf b/macros/latex/contrib/xsim/examples/xsim.blanks.pdf
new file mode 100644
index 0000000000..84a8e09b33
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.blanks.pdf
@@ -0,0 +1,230 @@
+%PDF-1.5
+%
+3 0 obj
+<<
+/Length 14398
+/Filter /FlateDecode
+>>
+stream
+xڥMYzy=lkH(:#`Ʊbb2g`#EMW^9(u~}?I_Zͯ6:^ǿ/_CӫOۿ?~?ߵ7j?s_{ޟ1__?~}?ט?__ͯOկw>g?}?{??>foݟ_}o1GWkmc~zo_=1Z[:1wӉX?m U:q'>itbN8?}:['w?]){hS'J))e/HY:~qtb eoo?R&&R&es<M[TesބMb='_|έ*{ 7*{3*{7Qo?P 6YɊM>6ٛٛ8ݞs5VٛP Uꬲ7*{ )[Oɫ넪Md UٛPӕlNf uٛ@.{[){N.|.{reI){7P.{eDބlvٛP uٞ7.{-vٛP t7.{}~ ᄺl_vٛP vY]9.{買.;]&eo"eItAU&TegބMsB6ʆNb UٛP*{63 5ٛP&{j7&gsN*{7*MUR&쬲7*{;XeoBU&
+)l鄺Mb t71\yeoB]&e*eOUʞW vYSuٛPU{.:.{7.{77..{Z7.{zR>S'eoB]V]&eoB]V]&f`e.ߧ.22QhL2*_WeU*|9tbkNUY&B6Ue[L̮ gkn5Y&Bd;jLL,_D|JK)rTe)){P*{|)kU&6Rs uٛP.{買.k빬\W'emބMa=)_|.{r9)M.]&e@ބvٛ@.]&e=|.]ovY첾e<P.]/M˒:.*{XeAFC'Pe` Ud.:&KK![lT&KK!?9lVY2\Je%õt$?N*K ),.ML,.њ] R6;, dd uY2\Jb%å-vY2\JYM'eZ.-ub+e.+wYBބ,.ZI~4P.Kk邺,.,.l%1uB]&,.lR,Ϲep-]PåvJc*+WYʊU?VY2\NÞ3 ddYepHc넚MRR&,.,ɏ{NʒR6lVY2\!RG UY*\JYUVTTj鄺,.4vY2\!:,.MT_`.K );] R>gM'eg.KK);eW'eRʮe.KÞ3.~tC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;ϣaNܦd~!iZݧlqudOԒ,s\jb i=u'^s+a-t9B(K4O>8e ҄=ǟWz?~//v,3WG
+;U5ɛ3]RpF2*]nva l4zɟ3%C O(Q[;H*\%#H lų(UcpD:6
+N)l/]|Eg !Lںi?H
+w|? nrZ⛔> .g7XSk*5%L74' fL=4`^:mi=F#j0F j&i)<Iؙ/YVf!4IfA }0L~ۊ 9߇DF!9I >/fv5a
+nKD@~Rx(4JBbkwgT}
+;bMzSMhO& %ZiMeZד wY T=
+a_%4IR&ۏB8I[13$z)$)|wjF=j8f,bZ/6grSGwz=u|946_G6`>vE9J#^{s@ܾnRzQS.lOZ"z4cxfgu.iO8d|4:me5IFg' Om_
+ӤlR?Q )޵$q/[l 60uȁ> OX\p+"eH|H}jNȞ*z>mo^ S2pb .㩀SƔ M-= `^R,u~K6ꑣ|I=H;n;M 3aܮdU8BI}ǎV%D:'#L֧Uv٧N9.ĬSY:fˢeIXmZQb60󤻤-x8g0La`7'k`8n`MZ5ӳXJq|hdGhB ? P~{덁.ZCƦ8ğL,&Uy(߁͙m5teYaW<$a`n
+:1 2'H
+endstream
+endobj
+15 0 obj
+<<
+/Producer (pdfTeX-1.40.21)
+/Creator (TeX)
+/CreationDate (D:20210130092305+01'00')
+/ModDate (D:20210130092305+01'00')
+/Trapped /False
+/PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) kpathsea version 6.3.2)
+>>
+endobj
+6 0 obj
+<<
+/Type /ObjStm
+/N 10
+/First 66
+/Length 860
+/Filter /FlateDecode
+>>
+stream
+xڕU[o;~_ǃP-UHMJå*UyXjw+g^MR<d27K&0g` y
+C_2v}IqYW( r^{~=Kg2>@ bш_*z6'[U1$JJϔHZ!~.u>IYbɇAH@* #J&9͎[)/~Xaɣ*rTL9ᩦ 
+.]SJ~%!>7 CzC;ܨ)0?^Tb 0B@(*xy #mLwwx, [`DPR'Jg](z*9j}'?n N:y6j=JW4`%V';J `fj{ "-. J}J@PZa=IO@4Kr6뵡:t;@iJ)|d *sE[MЛ+j^\޾<܀DŦZuLgIj'GO
+*Ev-hـeWk<z[pJC }g&2Q>~S au'c+ owI.kVc0;7g"KԂ@w c
+'?GW|CykoŶnt[6ƃ;ӑXɤbz@z7 7ۮFP
+endstream
+endobj
+16 0 obj
+<<
+/Type /XRef
+/Index [0 17]
+/Size 17
+/W [1 2 1]
+/Root 14 0 R
+/Info 15 0 R
+/ID [<79FF86B23A88DEBA1900AF923C8B468E> <79FF86B23A88DEBA1900AF923C8B468E>]
+/Length 61
+/Filter /FlateDecode
+>>
+stream
+xc`` @ '@̌s@| 9sX2
+endstream
+endobj
+startxref
+37945
+%%EOF
diff --git a/macros/latex/contrib/xsim/examples/xsim.blanks.tex b/macros/latex/contrib/xsim/examples/xsim.blanks.tex
new file mode 100644
index 0000000000..f32b81a129
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.blanks.tex
@@ -0,0 +1,22 @@
+\documentclass{article}
+\usepackage[ngerman]{babel}
+
+\usepackage{xsim,lipsum,xcolor}
+
+\xsimsetup{
+ solution/print = true ,
+ blank/filled-style = \underline{\textcolor{red}{#1}}
+}
+
+\begin{document}
+
+\begin{exercise}[points=3]
+ Erklären Sie den Begriff.
+
+ \blank[width=4\linewidth,linespread=1.5]{}
+\end{exercise}
+\begin{solution}
+ \blank[width=4\linewidth,linespread=1.5]{Die Lösung hier soll rot sein.}
+\end{solution}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.boxed-headings.pdf b/macros/latex/contrib/xsim/examples/xsim.boxed-headings.pdf
new file mode 100644
index 0000000000..fb9ff49f98
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.boxed-headings.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.boxed-headings.tex b/macros/latex/contrib/xsim/examples/xsim.boxed-headings.tex
new file mode 100644
index 0000000000..9ff47d9d99
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.boxed-headings.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+
+\usepackage{tcolorbox}
+\usepackage{xsim}
+\usepackage{needspace}
+
+\DeclareExerciseEnvironmentTemplate{custom}
+ {%
+ \Needspace*{5\baselineskip}
+ \begin{tcolorbox}
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}.}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}}%
+ \end{tcolorbox}
+ \noindent
+ }
+ {\vspace{\baselineskip}}
+
+\xsimsetup{exercise/template = custom}
+
+\usepackage{lipsum}
+
+\begin{document}
+
+\begin{exercise}[subtitle=Foo bar baz]
+ \lipsum[1]
+\end{exercise}
+
+\lipsum[2]
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.code-and-output.pdf b/macros/latex/contrib/xsim/examples/xsim.code-and-output.pdf
new file mode 100644
index 0000000000..4626e8c982
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.code-and-output.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.code-and-output.tex b/macros/latex/contrib/xsim/examples/xsim.code-and-output.tex
new file mode 100644
index 0000000000..15b1a7dea0
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.code-and-output.tex
@@ -0,0 +1,53 @@
+\documentclass{article}
+\usepackage{xsimverb,listings,xcolor}
+
+\lstdefinestyle{mystyle}{
+ language = [AlLaTeX]TeX ,
+ basicstyle = \ttfamily ,
+ columns = fullflexible ,
+ commentstyle = \color{gray!70} ,
+ keywordstyle = \color{red!70!black}
+}
+
+\makeatletter
+\NewDocumentEnvironment{example}{!o}
+ {%
+ \XSIMgobblechars{2}%
+ \XSIMsetfilebegin{\@percentchar\space file `\jobname.tmp'}%
+ \XSIMsetfileend{\@percentchar\space bye bye}%
+ \IfNoValueTF{#1}
+ {\XSIMfilewritestart*{\jobname.tmp}}
+ {\XSIMfilewritestart{\jobname.tmp}}%
+ }
+ {%
+ \XSIMfilewritestop
+ \lstinputlisting[style=mystyle]{\jobname.tmp}%
+ \input{\jobname.tmp}
+ }
+
+\NewDocumentEnvironment{code}{!o}
+ {%
+ \XSIMgobblechars{2}%
+ \IfNoValueTF{#1}
+ {\XSIMfilewritestart*{\jobname.tmp}}
+ {\XSIMfilewritestart{\jobname.tmp}}%
+ }
+ {%
+ \XSIMfilewritestop
+ \lstinputlisting[style=mystyle]{\jobname.tmp}%
+ }
+\makeatother
+
+\begin{document}
+
+\begin{example}
+ bla bla \LaTeX
+\end{example}
+
+\bigskip
+
+\begin{code}
+ blubber \LaTeX
+\end{code}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.collections.pdf b/macros/latex/contrib/xsim/examples/xsim.collections.pdf
new file mode 100644
index 0000000000..e7ccda79cf
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.collections.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.collections.tex b/macros/latex/contrib/xsim/examples/xsim.collections.tex
new file mode 100644
index 0000000000..5f75082a42
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.collections.tex
@@ -0,0 +1,44 @@
+\documentclass{article}
+\usepackage{xsim}
+\usepackage{lipsum}
+
+\DeclareExerciseCollection[difficulty=easy]{easy}
+\DeclareExerciseCollection[difficulty=medium]{medium}
+\DeclareExerciseTagging{difficulty}
+
+\xsimsetup{collect}
+
+\begin{document}
+
+\begin{exercise}[use,print]
+ outside before
+\end{exercise}
+
+\begin{exercise}[difficulty=easy,points=1]
+ foo one \lipsum[4]
+\end{exercise}
+\begin{solution}
+ foo one \lipsum[4]
+\end{solution}
+\begin{exercise}[difficulty=medium,points=1]
+ foo two \lipsum[4]
+\end{exercise}
+\begin{solution}
+ foo two \lipsum[4]
+\end{solution}
+\begin{exercise}[difficulty=easy,points=1]
+ foo three \lipsum[4]
+\end{exercise}
+\begin{solution}
+ foo three \lipsum[4]
+\end{solution}
+
+\section{Easy}
+\printcollection{easy}
+
+\section{Medium}
+\printcollection{medium}
+
+\printsolutions[difficulty=medium]
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.crossref.pdf b/macros/latex/contrib/xsim/examples/xsim.crossref.pdf
new file mode 100644
index 0000000000..19843c4185
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.crossref.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.crossref.tex b/macros/latex/contrib/xsim/examples/xsim.crossref.tex
new file mode 100644
index 0000000000..0a6c8f4eab
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.crossref.tex
@@ -0,0 +1,60 @@
+\documentclass{article}
+\usepackage{xsim,lipsum,hyperref}
+
+\DeclareExerciseHeadingTemplate{custom}
+ {\section{\XSIMexpandcode{\XSIMtranslate{default-heading}}}}
+
+\DeclareExerciseEnvironmentTemplate{custom}
+ {%
+ \IfInsideSolutionTF
+ {\label{sol:\ExerciseID}}
+ {\label{ex:\ExerciseID}}
+ \subsection*
+ {%
+ \XSIMmixedcase{\GetExerciseName}%
+ \IfInsideSolutionTF
+ {
+ to \GetExerciseParameter{exercise-name}%
+ ~\GetExerciseProperty{counter}%
+ }
+ {%
+ ~\GetExerciseProperty{counter}
+ \GetExercisePropertyT{subtitle}
+ { {\normalfont\itshape\PropertyValue}}%
+ }%
+ }
+ \noindent\llap{%
+ \footnotesize\sffamily
+ \IfInsideSolutionTF
+ {%
+ \XSIMmixedcase{\GetExerciseParameter{exercise-name}}
+ on page~\pageref{ex:\ExerciseID}.%
+ }
+ {%
+ \XSIMmixedcase{\GetExerciseParameter{solution-name}}
+ on page~\pageref{sol:\ExerciseID}.%
+ }%
+ \hspace*{\marginparsep}%
+ }%
+ }
+ {}
+\xsimsetup{
+ exercise/template = custom ,
+ solution/template = custom ,
+ print-solutions/headings-template = custom
+}
+
+\begin{document}
+
+\section{Exercises}
+\begin{exercise}
+ \lipsum[4]
+\end{exercise}
+\begin{solution}
+ \lipsum[4]
+\end{solution}
+
+\clearpage
+\printsolutions
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.description-list.pdf b/macros/latex/contrib/xsim/examples/xsim.description-list.pdf
new file mode 100644
index 0000000000..b05b3276c9
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.description-list.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.description-list.tex b/macros/latex/contrib/xsim/examples/xsim.description-list.tex
new file mode 100644
index 0000000000..f3c9ed6d74
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.description-list.tex
@@ -0,0 +1,42 @@
+\documentclass{article}
+\usepackage{xsim,lipsum}
+
+\DeclareExerciseEnvironmentTemplate{item}
+ {\item[\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}]}
+ {}
+\xsimsetup{
+ exercise/template=item,
+ solution/template=item,
+ print-solutions/headings-template=none
+}
+
+\newenvironment{exercises}
+ {\section{Exercises}\description}
+ {\enddescription}
+
+\newenvironment{solutions}
+ {\section{Solutions}\description}
+ {\enddescription}
+
+\begin{document}
+
+\begin{exercises}
+ \begin{exercise}
+ \lipsum[4]
+ \end{exercise}
+ \begin{solution}
+ \lipsum[3]
+ \end{solution}
+ \begin{exercise}
+ \lipsum[12]
+ \end{exercise}
+ \begin{solution}
+ \lipsum[23]
+ \end{solution}
+\end{exercises}
+
+\begin{solutions}
+ \printsolutions
+\end{solutions}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.different-point-types.pdf b/macros/latex/contrib/xsim/examples/xsim.different-point-types.pdf
new file mode 100644
index 0000000000..781831ddf8
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.different-point-types.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.different-point-types.tex b/macros/latex/contrib/xsim/examples/xsim.different-point-types.tex
new file mode 100644
index 0000000000..0ac3536776
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.different-point-types.tex
@@ -0,0 +1,52 @@
+\documentclass{article}
+\usepackage{xsim}
+
+\DeclareExerciseGoal{A}
+\DeclareExerciseGoal{C}
+\DeclareExerciseGoal{E}
+
+\newcommand*\printA{\TotalExerciseGoal{A}{~A~point}{~A~points}}
+\newcommand*\printC{\TotalExerciseGoal{C}{~C~point}{~C~points}}
+\newcommand*\printE{\TotalExerciseGoal{E}{~E~point}{~E~points}}
+
+\usepackage{needspace}
+\DeclareExerciseEnvironmentTemplate{custom}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \textbf{\GetExerciseProperty{counter}}%
+ \IfExercisePropertySetT{subtitle}
+ { \textit{\GetExerciseProperty{subtitle}}} %
+ \IfInsideSolutionF{%
+ \marginpar{%
+ (\IfExercisePropertySetTF{E}{\GetExerciseProperty{E}}{0}/%
+ \IfExercisePropertySetTF{C}{\GetExerciseProperty{C}}{0}/%
+ \IfExercisePropertySetTF{A}{\GetExerciseProperty{A}}{0})%
+ }%
+ }%
+ }
+ {}
+\xsimsetup{
+ exercise/template = custom ,
+ solution/template = custom
+}
+\renewcommand*\theexercise{\arabic{exercise}.}
+
+\begin{document}
+
+Reachable: \printA, \printC, and \printE.
+
+\begin{exercise}[E=1]
+ Differentiate $y=3x^2+5x+3$.
+\end{exercise}
+
+\begin{exercise}[E=2,C=1]
+ Find the equation of the tangent line to the function $y=x/2$ at $x=2$.
+\end{exercise}
+
+\begin{exercise}[C=1,A=2]
+ Prove that the derivative of a constant is zero.
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.difficulties.pdf b/macros/latex/contrib/xsim/examples/xsim.difficulties.pdf
new file mode 100644
index 0000000000..4963fb4836
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.difficulties.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.difficulties.tex b/macros/latex/contrib/xsim/examples/xsim.difficulties.tex
new file mode 100644
index 0000000000..02712f15d6
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.difficulties.tex
@@ -0,0 +1,53 @@
+\documentclass{article}
+
+\usepackage[clear-aux]{xsim}
+\DeclareExerciseTagging{difficulty}
+\xsimsetup{
+ difficulty={easy,hard}
+}
+
+\DeclareExerciseEnvironmentTemplate{custom}
+ {
+ \subsection*
+ {%
+ \XSIMmixedcase {\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{difficulty}
+ { {\normalfont(\GetExerciseProperty{difficulty})}}%
+ \IfInsideSolutionF{%
+ \IfExercisePropertySetT{subtitle}
+ { {\normalfont\itshape\GetExerciseProperty{subtitle}}}%
+ }%
+ }%
+ \IfExercisePropertySetT{points}
+ {%
+ \marginpar
+ {%
+ \IfInsideSolutionF{\rule{1.2cm}{1pt}\slash}%
+ \GetExerciseProperty{points}%
+ \IfExercisePropertySetT{bonus-points}
+ {\nobreakspace(+\GetExerciseProperty{bonus-points})}
+ \nobreakspace\XSIMtranslate{point-abbr}%
+ }%
+ }%
+ }
+ {}
+
+\xsimsetup{exercise/template = custom}
+
+\begin{document}
+
+\begin{exercise}[difficulty=easy]
+ An easy question.
+\end{exercise}
+\begin{exercise}[difficulty=medium]
+ This one's a bit harder.
+\end{exercise}
+\begin{exercise}[difficulty=hard]
+ Now let’s see if you can solve this one.
+\end{exercise}
+\begin{exercise}[difficulty=medium]
+ This is medium but printed anyway
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.floating.pdf b/macros/latex/contrib/xsim/examples/xsim.floating.pdf
new file mode 100644
index 0000000000..c1352837eb
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.floating.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.floating.tex b/macros/latex/contrib/xsim/examples/xsim.floating.tex
new file mode 100644
index 0000000000..08448df35a
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.floating.tex
@@ -0,0 +1,50 @@
+% floating exercises:
+\documentclass{article}
+\usepackage{xsim,newfloat,caption,lipsum}
+
+\DeclareFloatingEnvironment[
+ fileext=loe,
+ listname={List of Exercises},
+ name=Exercise,
+ placement=htp,
+]{ex}
+
+\DeclareExerciseEnvironmentTemplate{float}
+ {%
+ \ex
+ \captionsetup{labelformat=empty,singlelinecheck=false,listformat=empty}
+ \IfExercisePropertySetTF{subtitle}{%
+ \XSIMexpandcode{%
+ \noexpand\caption{%
+ \noexpand\textbf{%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}%
+ }: \GetExerciseProperty{subtitle}%
+ }%
+ }%
+ }{%
+ \caption{%
+ \textbf{%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}%
+ }%
+ }%
+ }%
+ }
+ {\endex}
+
+\xsimsetup{exercise/template = float}
+
+\begin{document}
+
+\listofexs
+
+\begin{exercise}
+ \lipsum[4]
+\end{exercise}
+
+\begin{exercise}[subtitle=Let's have a look]
+ \lipsum[4]
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.golatex-80640.pdf b/macros/latex/contrib/xsim/examples/xsim.golatex-80640.pdf
new file mode 100644
index 0000000000..068dc15fef
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.golatex-80640.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.golatex-80640.tex b/macros/latex/contrib/xsim/examples/xsim.golatex-80640.tex
new file mode 100644
index 0000000000..7ac1f15800
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.golatex-80640.tex
@@ -0,0 +1,130 @@
+% http://golatex.de/viewtopic,p,80640.html
+\documentclass[fontsize=12pt,parskip=half]{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[ngerman]{babel}
+
+\newlength\breite
+\setlength\breite{160mm}
+\newlength\hoehe
+\setlength\hoehe{80mm}
+
+\usepackage[
+ hdivide={3.0cm,\breite,},
+ vdivide={2.2cm,,2.2cm}]{geometry}
+\usepackage[bitstream-charter]{mathdesign}
+
+\usepackage[babel]{microtype}
+
+\usepackage[inline]{enumitem}
+
+\usepackage{amsmath,siunitx}
+\sisetup{
+ locale = DE ,
+ per-mode = fraction
+}
+
+\usepackage{xsim,needspace,tikz,tcolorbox}
+
+\xsimsetup{
+ exercise/template = gitter ,
+ solution/template = gitter
+}
+
+\DeclareExerciseEnvironmentTemplate{gitter}
+ {%
+ \IfInsideSolutionT{%
+ \tcolorbox[
+ detach title ,
+ title = Lösung: ,
+ before upper = {\tcbtitle\space} ,
+ fonttitle = \bfseries ,
+ fontupper = \large ,
+ valign = center ,
+ colframe = black!50!white ,
+ colback = black!12!white ,
+ coltext = blue ,
+ coltitle = blue ,
+ height = \hoehe ,
+ width = \breite ,
+ sharp corners
+ ]
+ }%
+ }
+ {%
+ \IfInsideSolutionTF
+ {\endtcolorbox}
+ {%
+ \IfSolutionPrintF{%
+ \par
+ \begin{tikzpicture}[semitransparent]
+ \draw[step=4mm, line width=0.15mm, black!60!white] (0,0) grid
+ (\breite,\hoehe);
+ \end{tikzpicture}
+ \par
+ }
+ }%
+ }
+
+\begin{document}
+
+\begin{exercise}
+ Für die \textbf{Schülerausgabe} sollen Häuschen (Grid) mit Seitenlänge
+ \SI{4}{\mm} gesetzt werden.
+\end{exercise}
+\begin{solution}
+ Hier soll die Lösung stehen: $E=m\cdot c^2$.
+\end{solution}
+
+\xsimsetup{solution/print=true}
+
+\begin{exercise}
+ Für die \textbf{Lehrerausgabe} sollen statt Häuschen die Lösung in
+ z.\,B. einer Box geschrieben werden. Dafür soll die Lösung (bezogen auf
+ dieses Beispiel) auch in einer Box mit der exakten Breite \SI{160}{\mm} und
+ der exakten Höhe \SI{80}{\mm} gesetzt werden. Weiter soll natürlich die
+ Position der Lösungsbox und der Häuschenbox exakt identisch sein.
+\end{exercise}
+\begin{solution}
+ Hier soll die Lösung stehen: $E=m\cdot c^2$.
+\end{solution}
+
+\clearpage
+
+\begin{exercise}
+ Beschreiben Sie die \textbf{Satzgruppe des Pythagoras}.
+\end{exercise}
+\begin{solution}
+ \begin{align*}
+ \left.\begin{aligned}
+ c^2 &=a^2+b^2\\
+ a^2 &=p\cdot c\;\wedge\; b^2=q\cdot c\\
+ h^2 &=p\cdot q
+ \end{aligned}\right\}
+ \begin{gathered}
+ \text{Satzgruppe}\\
+ \text{des Pythagoras}
+ \end{gathered}
+ \end{align*}
+\end{solution}
+
+\begin{exercise}
+ Geben Sie die Formel der \textbf{gleichförmigen Bewegung} wieder. Gehen Sie
+ davon aus, dass Sie 1000~Meter in
+ \SI[parse-numbers=false]{3\frac{1}{2}}{Minuten} laufen.
+ \begin{enumerate*}[label=\bfseries\alph*)]
+ \item Mit welcher Geschwindigkeit legen Sie die Strecke zurück?
+ \item Geben Sie die Geschwindigkeit in \si{\km\per\hour} an.
+ \end{enumerate*}
+ \textbf{Hinweis:} Nehmen Sie zur Berechnung die vereinfachte Form und gehen
+ Sie davon aus, dass Ihre Geschwindigkeit konstant ist.
+\end{exercise}
+\begin{solution}
+ \begin{align*}
+ s &=v\cdot t+s_0 \\
+ 1000 &=v\cdot 210 \\
+ v &=\frac{\SI{1000}{\m}}{\SI{210}{\second}} \\
+ v &=\SI{4.76}{\m\per\second} = \SI{17.1}{\km\per\hour}
+ \end{align*}
+\end{solution}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.golatex-91339.pdf b/macros/latex/contrib/xsim/examples/xsim.golatex-91339.pdf
new file mode 100644
index 0000000000..189210a8a3
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.golatex-91339.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.golatex-91339.tex b/macros/latex/contrib/xsim/examples/xsim.golatex-91339.tex
new file mode 100644
index 0000000000..ae02ca0344
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.golatex-91339.tex
@@ -0,0 +1,93 @@
+% http://golatex.de/viewtopic,p,91339.html
+\documentclass[a4paper]{article}
+\usepackage[ngerman]{babel}
+
+\usepackage{xsim,tcolorbox}
+\usepackage{amsmath}
+\xsimsetup{
+ exercise/within = section ,
+ exercise/the-counter = \thesection.\arabic{exercise} ,
+ print-solutions/headings-template=none
+}
+\SetExerciseParameters{exercise}{
+ exercise-template = mine ,
+ solution-template = mine
+}
+
+\DeclareExerciseEnvironmentTemplate{mine}
+ {%
+ \tcolorbox[
+ % colors:
+ colback = white , colframe = black , coltitle = black ,
+ % rules:
+ boxrule = 0pt , toprule = 1pt , bottomrule = 1pt , arc = 0pt ,
+ % spacing:
+ boxsep = 0pt , left = 0pt , right = 0pt ,
+ % title:
+ detach title , before upper = \tcbtitle\par\noindent ,
+ fonttitle = \bfseries ,
+ title = \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}
+ ]
+ }
+ {\endtcolorbox}
+
+\DeclareExerciseTranslation{German}{exercise}{Aufgabe}
+\DeclareExerciseTagging{difficulty}
+
+\begin{document}
+
+\section{Wellenausbreitung im Vakuum und in Materie}
+\subsection{Maxwellsche Gleichungen}
+
+\begin{align*}
+ \nabla \cdot \vec{E}\left(\vec{r}, t \right) =
+ \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0}
+\end{align*}
+
+\begin{exercise}[difficulty=easy]
+Something stupid
+\end{exercise}
+\begin{solution}
+Here is a nonstupid solution for your problem
+\end{solution}
+
+\subsection{Empirischer Zugang zu Wellengleichungen}
+
+\begin{exercise}[difficulty=hard]
+Eine weitere Aufgabe
+\end{exercise}
+\begin{solution}
+Solution Number 2
+\end{solution}
+
+\subsection*{Lösungen}
+\printsolutions[section,difficulty=hard]
+
+\section{Wellenausbreitung im Vakuum und in Materie}
+\subsection{Maxwellsche Gleichungen}
+
+\begin{align*}
+ \nabla \cdot \vec{E}\left(\vec{r}, t \right) =
+ \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0}
+\end{align*}
+
+\begin{exercise}[difficulty=easy]
+Something stupid
+\end{exercise}
+\begin{solution}
+Here is a nonstupid solution for your problem
+\end{solution}
+
+\subsection{Empirischer Zugang zu Wellengleichungen}
+
+\begin{exercise}[difficulty=hard]
+Eine weitere Aufgabe
+\end{exercise}
+\begin{solution}
+Solution Number 2
+\end{solution}
+
+\subsection*{Lösungen}
+\printsolutions[section]
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.grade-distribution.pdf b/macros/latex/contrib/xsim/examples/xsim.grade-distribution.pdf
new file mode 100644
index 0000000000..2de9ff1358
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.grade-distribution.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.grade-distribution.tex b/macros/latex/contrib/xsim/examples/xsim.grade-distribution.tex
new file mode 100644
index 0000000000..8e9731de24
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.grade-distribution.tex
@@ -0,0 +1,56 @@
+\documentclass{article}
+\usepackage{xsim}
+
+\xsimsetup{grades/split=;}
+
+\DeclareGradeDistribution{
+ 1 = 1 ;
+ 1,5 = .9167 ;
+ 2 = .8333 ;
+ 2,5 = .75 ;
+ 3 = .6667 ;
+ 3,5 = .5833 ;
+ 4 = .5
+}
+
+\begin{document}
+
+\begin{exercise}[points=4]
+\end{exercise}
+
+\begin{exercise}[points=4]
+\end{exercise}
+
+\begin{exercise}[points=4]
+\end{exercise}
+
+\begin{exercise}[points=4,bonus-points=10]
+\end{exercise}
+
+\begin{exercise}[points=4]
+\end{exercise}
+
+\begin{exercise}[points=4]
+\end{exercise}
+
+
+\goalsforgrade{points + bonus-points}{1,5}
+\goalsforgrade{points+bonus-points}{2}
+
+\pointsforgrade{1}
+\pointsforgrade{1,5}
+\pointsforgrade{2}
+\pointsforgrade{2,5}
+\pointsforgrade{3}
+\pointsforgrade{3,5}
+\pointsforgrade{4}
+
+\totalgoalforgrade{1}
+\totalgoalforgrade{1,5}
+\totalgoalforgrade{2}
+\totalgoalforgrade{2,5}
+\totalgoalforgrade{3}
+\totalgoalforgrade{3,5}
+\totalgoalforgrade{4}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.hints.pdf b/macros/latex/contrib/xsim/examples/xsim.hints.pdf
new file mode 100644
index 0000000000..4b13a435d6
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.hints.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.hints.tex b/macros/latex/contrib/xsim/examples/xsim.hints.tex
new file mode 100644
index 0000000000..82d89f6944
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.hints.tex
@@ -0,0 +1,54 @@
+% https://tex.stackexchange.com/q/224408/
+\documentclass{article}
+\usepackage{xsim}
+
+\usepackage{needspace}
+
+\DeclareExerciseProperty{hint}
+
+% we'll use a description list for the hints:
+\newcommand\printhints{%
+ \begin{description}
+ \ForEachUsedExerciseByType{%
+ \GetExercisePropertyT{hint}
+ {\item[\XSIMmixedcase{\GetExerciseName}~##3]####1}%
+ }%
+ \end{description}
+}
+
+\newcommand\hint[1]{\SetExerciseProperty{hint}{#1}}
+
+\begin{document}
+
+\section{Problems}
+% set hint through option:
+\begin{exercise}[subtitle=Pythagoras,hint=This is a hint to the first problem.]
+ This is the first problem.
+\end{exercise}
+\begin{solution}
+ This is the solution to the first problem.
+\end{solution}
+
+\begin{exercise}[subtitle=Another Problem]
+ This is the second problem.
+\end{exercise}
+\begin{solution}
+ This is the solution to the second problem.
+\end{solution}
+
+% set hint with custom command:
+\begin{exercise}[subtitle=Yet Another Problem]
+ This is the third problem.
+ \hint{This is a hint to the third problem.}
+\end{exercise}
+\begin{solution}
+ This is the solution to the third problem.
+\end{solution}
+
+\section{Hints}
+\printhints
+
+\section{Solutions}
+\printsolutions[headings=false]
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.issues-49.pdf b/macros/latex/contrib/xsim/examples/xsim.issues-49.pdf
new file mode 100644
index 0000000000..3ea1c70ace
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.issues-49.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.issues-49.tex b/macros/latex/contrib/xsim/examples/xsim.issues-49.tex
new file mode 100644
index 0000000000..f9baf0a601
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.issues-49.tex
@@ -0,0 +1,122 @@
+\documentclass{article}
+\usepackage{xsim}
+
+\xsimsetup{
+ load-style = layouts ,
+ exercise/template = runin ,
+ solution/template = runin
+}
+
+\usepackage{tasks,fontawesome,fmtcount,multicol}
+\NewTasksEnvironment[label=\Alph*),label-width=12pt]{choices}[\choice]
+\newcommand*\correct{\thetask\expanded{\SetExerciseProperty{choice}{\thetask}}}
+
+\NewTasksEnvironment[label=\Roman*,label-width=12pt]{options}[\option]
+
+\DeclareExerciseProperty{choice}
+
+\newcommand*\pkg[1]{\texttt{#1}}
+\newcommand*\cls[1]{\texttt{#1}}
+
+\newcommand\EA[2]{\IfInsideSolutionTF{#2}{#1}}
+\newcommand\answer[1]{\IfInsideSolutionT{#1}}
+
+\begin{document}
+
+\section{List of exercises}
+Solve and answer the following exercises.
+
+\begin{exercise}
+ Factor $x^{2}-2x+1$
+\end{exercise}
+\begin{solution}
+ $\left(x-1\right)^{2}$
+\end{solution}
+\begin{exercise}
+ Factor $3x+3y+3z$
+\end{exercise}
+\begin{solution}
+ $3(x+y+z)$
+\end{solution}
+
+\begin{exercise}[solution]
+ \EA{True or false?}{}
+ \begin{tasks}(2)
+ \task \EA{$\alpha > \delta$}{False}
+ \task \EA{\LaTeX2e\ is cool?}{Very True!}
+ \end{tasks}
+\end{exercise}
+
+\begin{exercise}[subtitle=Talking Linux,solution]
+ \begin{tasks}(2)
+ \task \EA{You use linux?}{Yes}
+ \task \EA{Usually uses the package manager?}{Yes}
+ \end{tasks}
+\end{exercise}
+
+\begin{exercise}[solution]
+ \EA{Rate the following \LaTeX\ packages and classes.}{}
+ \begin{tasks}(\EA{3}{1})
+ \task \EA{\cls{xsim-exam}}{doesn't exist for now}
+ \task \EA{\pkg{xsim}}{very good}
+ \task \EA{\pkg{exsheets}}{obsolete}
+ \end{tasks}
+\end{exercise}
+
+\begin{exercise}
+ \begin{choices}(5)
+ \choice value
+ \choice value
+ \choice value
+ \choice[\correct] correct
+ \choice value
+ \end{choices}
+\end{exercise}
+\begin{solution}
+ \GetExerciseProperty{choice}
+\end{solution}
+
+\begin{exercise}
+ \begin{options}(3)
+ \option $2\alpha+2\delta=90^{\circ}$
+ \option $\alpha=\delta$
+ \option $\angle EDF=45^{\circ}$
+ \end{options}
+ \begin{choices}(4)
+ \choice I only
+ \choice[\correct] II only
+ \choice I and II only
+ \choice I and III only
+ \choice I, II, and III
+ \end{choices}
+\end{exercise}
+\begin{solution}
+ \GetExerciseProperty{choice}
+\end{solution}
+
+\begin{exercise}
+ \begin{tasks}[label=(\arabic*),label-width=13pt](2)
+ \task $2\alpha+2\delta=90^{\circ}$
+ \task $\angle EDF=45^{\circ}$
+ \end{tasks}
+ \begin{choices}(3)
+ \choice Alternative A
+ \choice Alternative B
+ \choice[\correct] Alternative C
+ \choice Alternative D
+ \choice Alternative E
+ \end{choices}
+\end{exercise}
+\begin{solution}
+ \GetExerciseProperty{choice}
+\end{solution}
+
+\clearpage
+
+\section{Solutions}
+\raggedcolumns
+\begin{multicols}{2}
+ \printsolutions[headings=false]
+\end{multicols}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.listings.pdf b/macros/latex/contrib/xsim/examples/xsim.listings.pdf
new file mode 100644
index 0000000000..8383fd8b0c
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.listings.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.listings.tex b/macros/latex/contrib/xsim/examples/xsim.listings.tex
new file mode 100644
index 0000000000..a5fe951beb
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.listings.tex
@@ -0,0 +1,48 @@
+% http://tex.stackexchange.com/questions/131546/
+\documentclass{article}
+
+\usepackage{xcolor}
+\usepackage{listings}
+\usepackage[use-files]{xsim}
+
+\lstset{
+ frame=single,
+ xleftmargin=20pt,
+ numbers=left,
+ numberstyle=\small,
+ tabsize=2,
+ breaklines,
+ showspaces=false,
+ showstringspaces=false,
+ language=C,
+ basicstyle=\small\ttfamily,
+ commentstyle=\itshape\color{gray}
+}
+
+\begin{document}
+
+\begin{exercise}[points=6]
+Consider the following C program.
+\begin{lstlisting}
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+ printf("hello, world\n");
+}
+\end{lstlisting}
+\end{exercise}
+\begin{solution}
+Consider the following C program.
+\begin{lstlisting}
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+ printf("hello, world\n");
+}
+\end{lstlisting}
+\end{solution}
+
+\pagebreak
+\printsolutions
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.listofexercises.pdf b/macros/latex/contrib/xsim/examples/xsim.listofexercises.pdf
new file mode 100644
index 0000000000..46bf9b89e4
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.listofexercises.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.listofexercises.tex b/macros/latex/contrib/xsim/examples/xsim.listofexercises.tex
new file mode 100644
index 0000000000..c2a9a3fe36
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.listofexercises.tex
@@ -0,0 +1,81 @@
+% https://tex.stackexchange.com/q/94766/
+\documentclass[a4paper,10pt]{book}
+\usepackage[utf8]{inputenc}
+
+\usepackage{xsim}
+\xsimsetup{
+ exercise/within=chapter,
+ exercise/template=theorem ,
+ exercise/the-counter=\thechapter.\arabic{exercise}
+}
+
+\DeclareExerciseEnvironmentTemplate{theorem}
+ {%
+ \par\addvspace{\baselineskip}
+ \noindent
+ \XSIMexpandcode{\noexpand\label{\ExerciseType:\ExerciseID}}
+ \Large\textbf{%
+ \space\GetExerciseProperty{counter}%
+ \GetExercisePropertyT{subtitle}{ (\PropertyValue)}%
+ } \normalsize\itshape
+ }
+ {\par\addvspace{\baselineskip}}
+
+\usepackage{multicol}
+
+\newcommand\listofexercises{
+ \chapter*{List of Exercises}
+ \def\CurrentExerciseChapter{}%
+ \ForEachPrintedExerciseByType{
+ \global\let\LastExerciseChapter\CurrentExerciseChapter
+ \xdef\CurrentExerciseChapter{\ExercisePropertyGet{##1}{##2}{chapter}}%
+ \XSIMifeqF{\LastExerciseChapter}{\CurrentExerciseChapter}
+ {
+ \XSIMifblankF{\LastExerciseChapter}{\end{multicols}}
+ \begin{multicols}{2}%
+ [\contentsline{chapter}{Chapter \CurrentExerciseChapter}{}{}]
+ }
+ \contentsline
+ {section}
+ {%
+ Exercise \ExercisePropertyGet{##1}{##2}{counter}%
+ \XSIMifblankF{##4}{ (##4)}%
+ }
+ {\pageref{##1:##2}}{}%
+ }
+ \end{multicols}
+}
+
+% \usepackage{hyperref}
+% \newcommand\theHexercise{\thechapter.\arabic{exercise}}
+
+\begin{document}
+
+\chapter{kinetic}
+\begin{exercise}
+ 435-1
+\end{exercise}
+\begin{exercise}[subtitle=Foo Bar]
+ 435-2
+\end{exercise}
+\begin{exercise}
+ 435-3
+\end{exercise}
+
+\chapter{momentum}
+\begin{exercise}
+ 436-1
+\end{exercise}
+\begin{exercise}
+ 436-2
+\end{exercise}
+\begin{exercise}
+ 436-3
+\end{exercise}
+\begin{exercise}
+ 436-4
+\end{exercise}
+
+\listofexercises
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.multiplechoice.pdf b/macros/latex/contrib/xsim/examples/xsim.multiplechoice.pdf
new file mode 100644
index 0000000000..0e49066a70
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.multiplechoice.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.multiplechoice.tex b/macros/latex/contrib/xsim/examples/xsim.multiplechoice.tex
new file mode 100644
index 0000000000..e0db3eb0c5
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.multiplechoice.tex
@@ -0,0 +1,70 @@
+\documentclass{scrartcl}
+\usepackage[clear-aux]{xsim}
+
+\usepackage{enumitem,amssymb,fmtcount}
+\newlist{choices}{itemize}{1}
+\setlist[choices]{label=$\Box$}
+\newcommand*\choice{\item}
+
+\DeclareExerciseProperty{choices}
+\DeclareExerciseProperty*{multiple}
+\DeclareExerciseEnvironmentTemplate{mc}
+ {%
+ \UseExerciseTemplate{begin}{default}%
+ \IfExerciseBooleanPropertyTF{multiple}
+ {Select one or more correct answers}
+ {%
+ \GetExercisePropertyT{choices}
+ {Select \numberstringnum{#1} correct answer\ifnum#1>1 s\fi.}%
+ }%
+ \begin{choices}
+ }
+ {%
+ \end{choices}
+ \UseExerciseTemplate{end}{default}%
+ }
+
+\DeclareExerciseType{mc}{
+ exercise-env = multiplechoice ,
+ solution-env = correctchoices ,
+ exercise-name = Question ,
+ solution-name = Solution ,
+ exercise-template = mc ,
+ solution-template = mc ,
+ counter = exercise
+}
+
+\xsimsetup{
+ exercise/name = Question ,
+ solution/name = Solution
+}
+
+\begin{document}
+
+\section{Questions}
+\begin{multiplechoice}[choices=1]
+ \choice one
+ \choice two
+ \choice three
+ \choice four
+\end{multiplechoice}
+
+\begin{exercise}
+ Answer this question on a separate sheet.
+\end{exercise}
+
+\begin{multiplechoice}[multiple]
+ \choice one
+ \choice two
+ \choice three
+ \choice four
+\end{multiplechoice}
+
+\begin{multiplechoice}[choices=2]
+ \choice one
+ \choice two
+ \choice three
+ \choice four
+\end{multiplechoice}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.pointsums.pdf b/macros/latex/contrib/xsim/examples/xsim.pointsums.pdf
new file mode 100644
index 0000000000..225595afe3
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.pointsums.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.pointsums.tex b/macros/latex/contrib/xsim/examples/xsim.pointsums.tex
new file mode 100644
index 0000000000..29d7ac0cdc
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.pointsums.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+\usepackage{xsim,lipsum}
+
+\NewDocumentCommand\printcompletepoints{}{%
+ \TotalExerciseGoals{points + bonus-points}
+ {\,\XSIMtranslate{point}}
+ {\,\XSIMtranslate{points}}%
+}
+
+\NewDocumentCommand\pointsandbonus{}{%
+ \TotalExerciseGoal{points}{}{}%
+ \IfExerciseGoalsSumTF{bonus-points}{=0}
+ {}
+ {\,(+\,\TotalExerciseGoal{bonus-points}{}{})}%
+ \,\XSIMtranslate{points}%
+}
+
+\begin{document}
+
+\begin{exercise}[points=3,bonus-points=1]
+ \lipsum[4]
+\end{exercise}
+
+\begin{exercise}[points=8,bonus-points=3]
+ \lipsum[4]
+\end{exercise}
+
+\printtotalpoints\ vs.\@ \printcompletepoints\ vs.\@ \pointsandbonus
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.randomexercises.pdf b/macros/latex/contrib/xsim/examples/xsim.randomexercises.pdf
new file mode 100644
index 0000000000..670825d54a
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.randomexercises.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.randomexercises.tex b/macros/latex/contrib/xsim/examples/xsim.randomexercises.tex
new file mode 100644
index 0000000000..aafb3ddae1
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.randomexercises.tex
@@ -0,0 +1,50 @@
+\documentclass{article}
+\usepackage{xsim}
+
+\xsimsetup{collect}
+
+\begin{document}
+
+\begin{exercise}[ID=A]
+ exercise A
+\end{exercise}
+\begin{solution}
+ solution A
+\end{solution}
+\begin{exercise}[ID=B]
+ exercise B
+\end{exercise}
+\begin{solution}
+ solution B
+\end{solution}
+\begin{exercise}[ID=C]
+ exercise C
+\end{exercise}
+\begin{solution}
+ solution C
+\end{solution}
+\begin{exercise}[ID=D]
+ exercise D
+\end{exercise}
+\begin{solution}
+ solution D
+\end{solution}
+\begin{exercise}[ID=E]
+ exercise E
+\end{exercise}
+\begin{solution}
+ solution E
+\end{solution}
+\begin{exercise}[ID=F]
+ exercise F
+\end{exercise}
+\begin{solution}
+ solution F
+\end{solution}
+
+\section*{Exercises}
+\printrandomexercises[collection=all exercises,exclude=D]{3}
+
+\printsolutions
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-13635.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-13635.pdf
new file mode 100644
index 0000000000..ff493e3591
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-13635.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-13635.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-13635.tex
new file mode 100644
index 0000000000..c0d08a567f
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-13635.tex
@@ -0,0 +1,72 @@
+% https://tex.stackexchange.com/q/13635/
+\documentclass{article}
+\usepackage{xsim}
+
+\DeclareExerciseEnvironmentTemplate{theorem:remark}
+ {
+ \par\addvspace{\baselineskip}
+ \noindent
+ \textit{%
+ \IfInsideSolutionF{\XSIMmixedcase{\GetExerciseName}~}%
+ \GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textup{(#1)}}%
+ . %
+ }
+ {\par\addvspace{\baselineskip}}
+
+\DeclareExerciseHeadingTemplate{exercises}{\subsection*{Exercises}}
+
+\xsimsetup{
+ exercise/template = theorem:remark ,
+ exercise/within = section ,
+ exercise/the-counter = \thesection.\arabic{exercise} ,
+ print-collection/headings = true ,
+ print-collection/headings-template = exercises
+}
+
+\DeclareExerciseCollection{prime numbers}
+\DeclareExerciseCollection{Zeta function}
+
+\xsimsetup{collect}
+
+\begin{document}
+
+\collectexercises{prime numbers}
+\section{Prime Numbers}
+
+A \emph{prime number} is a positive integer other than $1$ that is only
+divisible by $1$ and itself.
+
+\begin{exercise}[subtitle=Euclid's Theorem]
+ \label{ex:euclid}
+ Show that there are infinitely many prime numbers.
+\end{exercise}
+
+As you will show in Exercise \ref{ex:euclid}, there are infinitely many
+primes. The number of primes that are smaller than a given natural number $n$
+is denoted $\pi(n)$.
+
+\begin{exercise}
+ Find an asymptotic formula for $\pi(n)$. \emph{Hint:} You might find
+ Exercise \ref{ex:zeta} helpful.
+\end{exercise}
+\collectexercisesstop{prime numbers}
+
+\printcollection{prime numbers}
+
+\collectexercises{Zeta function}
+\section{Zeta function}
+
+The zeta function is given by $\zeta(s) = \sum_{n=1}^\infty n^{-s}$, where $s$
+is a complex number with real part bigger than $1$.
+\begin{exercise}\label{ex:zeta}
+ Extend $\zeta$ as far as possible and find all zeros
+ of the function.
+\end{exercise}
+For example $\zeta(2) = \frac{\pi^2}{6}$.
+
+\collectexercisesstop{Zeta function}
+
+\printcollection{Zeta function}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-155630.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-155630.pdf
new file mode 100644
index 0000000000..40bacabc8e
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-155630.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-155630.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-155630.tex
new file mode 100644
index 0000000000..015f52db0f
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-155630.tex
@@ -0,0 +1,25 @@
+% https://tex.stackexchange.com/q/155630/
+\documentclass{article}
+\usepackage{xsim}
+
+\DeclareExerciseCollection{foo}
+\xsimsetup{collect}
+
+\begin{document}
+
+\begin{exercise}
+ foo
+\end{exercise}
+\begin{exercise}
+ bar
+\end{exercise}
+\begin{exercise}
+ baz
+\end{exercise}
+
+% shuffle around for a different version:
+\printexercise{exercise}{1}
+\printexercise{exercise}{3}
+\printexercise{exercise}{2}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-199360.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-199360.pdf
new file mode 100644
index 0000000000..8c1d7cc9d5
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-199360.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-199360.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-199360.tex
new file mode 100644
index 0000000000..334275140a
--- /dev/null
+++ b/macros/latex/contrib/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}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-299534.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-299534.pdf
new file mode 100644
index 0000000000..c9500e089f
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-299534.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-299534.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-299534.tex
new file mode 100644
index 0000000000..e330f3d256
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-299534.tex
@@ -0,0 +1,32 @@
+% http://tex.stackexchange.com/q/299534/
+\documentclass{article}
+\usepackage{pythontex}
+\usepackage[use-files]{xsim}
+
+\begin{document}
+
+\section{Test}
+
+\begin{exercise}[subtitle = Codeless Question,points=10]
+ A question without code, worth 10 points. Subtitle and point values are in
+ correct place.
+\end{exercise}
+\begin{solution}
+ Solution 1
+\end{solution}
+
+\begin{exercise}[subtitle = Codeful Question,points=15]
+Now with PythonTeX:
+\begin{pyblock}
+print("hello, world!")
+sum = 0
+for j in range(0,100):
+ sum += j
+print(sum)
+\end{pyblock}
+\end{exercise}
+\begin{solution}
+ Solution 2
+\end{solution}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-305110.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-305110.pdf
new file mode 100644
index 0000000000..4b9558d90f
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-305110.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-305110.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-305110.tex
new file mode 100644
index 0000000000..c10928da0c
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-305110.tex
@@ -0,0 +1,67 @@
+% https://tex.stackexchange.com/q/305110
+\documentclass[12pt, a4paper]{book}
+\usepackage{xsim}
+
+\xsimsetup{
+ exercise/within = section ,
+ exercise/the-counter = \thesection.\arabic{exercise}
+}
+
+\begin{document}
+\part{EXCERCISES}
+\chapter{Topic 1}
+
+\section{Section}
+
+\begin{exercise}
+ I'm an excercise.
+\end{exercise}
+\begin{solution}
+ I'm a solution.
+\end{solution}
+
+\section{Section}
+
+\begin{exercise}
+ I'm an excercise.
+\end{exercise}
+\begin{solution}
+ I'm a solution.
+\end{solution}
+
+\chapter{Topic 2}
+
+\section{Section}
+\begin{exercise}
+ I'm an excercise.
+\end{exercise}
+\begin{solution}
+ I'm a solution.
+\end{solution}
+
+\section{Section}
+\begin{exercise}
+ I'm an excercise.
+\end{exercise}
+\begin{solution}
+ I'm a solution.
+\end{solution}
+
+\setcounter{chapter}{0}
+\part{SOLUTIONS}
+
+\chapter{Topic 1}
+\section{Section}
+\printsolutions[chapter=1,section=1]
+
+\section{Section}
+\printsolutions[chapter=1,section=2]
+
+\chapter{Topic 2}
+\section{Section}
+\printsolutions[chapter=2,section=1]
+
+\section{Section}
+\printsolutions[chapter=2,section=2]
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-308883.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-308883.pdf
new file mode 100644
index 0000000000..02039dbc68
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-308883.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-308883.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-308883.tex
new file mode 100644
index 0000000000..74e762fa08
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-308883.tex
@@ -0,0 +1,13 @@
+% https://tex.stackexchange.com/q/308883/
+\documentclass{article}
+\usepackage{xsim,siunitx}
+\xsimsetup{goal-print={\num{#1}}}
+\sisetup{output-decimal-marker={,}}
+
+\begin{document}
+
+\begin{exercise}[points=2.5]
+ foo
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-338165.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-338165.pdf
new file mode 100644
index 0000000000..9e8168af2f
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-338165.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-338165.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-338165.tex
new file mode 100644
index 0000000000..72ee108668
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-338165.tex
@@ -0,0 +1,68 @@
+% http://tex.stackexchange.com/q/338165
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage{leading,microtype}
+\usepackage[french]{babel}
+
+\usepackage{tasks}
+\usepackage{xsim}
+\usepackage{tcolorbox}
+\tcbuselibrary{breakable, skins}
+\settasks{ label = \arabic*. }
+
+\DeclareExerciseEnvironmentTemplate{boxed}{%
+ \tcolorbox[
+ enhanced ,
+ attach boxed title to top center = {yshift=-7.5pt} ,
+ colback = white , colbacktitle = white ,
+ coltitle = black , colframe = black ,
+ boxed title style = { colframe = white } ,
+ fonttitle=\bfseries,
+ sharp corners=all,
+ breakable,
+ title=
+ \XSIMmixedcase{\GetExerciseName}%
+ \IfInsideSolutionF{%
+ ~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{subtitle}{: \GetExerciseProperty{subtitle}}%
+ }%
+ ]
+}{\endtcolorbox}
+
+\xsimsetup{
+ exercise/template = boxed ,
+ solution/template = boxed ,
+ solution/print = true
+}
+
+\leading{15pt}
+
+\newcommand*\complement{\overline}
+\newcommand*\union{\cup}
+\newcommand*\intersection{\cap}
+\newcommand*\set[1]{\{#1\}}
+
+\begin{document}
+
+\begin{exercise}[subtitle=Set Calculus]
+ Soient $E=\set{1,2,3,4,5,6,7}$ et $A$, $B$, $C$ et $D$ quatre parties de E
+ d\'efinies par $A=\set{1,2,3,4}$, $B=\set{4,5,6,7}$, $C=\set{1,3,5,7}$ et
+ $D=\set{2,3,4,5,6}$.
+ \begin{tasks}(2)
+ \task Calculer $\complement{A}$.
+ \task Calculer $(A\union B) \intersection (C\union D)$.
+ \task Calculer $(A\intersection B) \union (C\intersection D)$.
+ \task Calculer $\complement{(\complement{A}\union B)} \union
+ \complement{(C\intersection D)}$.
+ \end{tasks}
+\end{exercise}
+\begin{solution}
+ \begin{tasks}(2)
+ \task $\set{5,6,7}$
+ \task $E$
+ \task $\set{3,4,5}$
+ \task $\set{1,2,3,4,6,7}$
+ \end{tasks}
+\end{solution}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-350028.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-350028.pdf
new file mode 100644
index 0000000000..2f58a0fde7
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-350028.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-350028.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-350028.tex
new file mode 100644
index 0000000000..f0d977a131
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-350028.tex
@@ -0,0 +1,130 @@
+% http://tex.stackexchange.com/q/350028/
+\documentclass{book}
+\usepackage[T1]{fontenc}
+\usepackage{xsim}
+\usepackage[most]{tcolorbox}
+\tcbuselibrary{skins,breakable}
+
+\DeclareExerciseEnvironmentTemplate{tcolorbox}{%
+ \tcolorbox[
+ enhanced,
+ colframe=green!20!black,
+ colback=yellow!10!white,
+ coltitle=green!40!black,
+ fonttitle=\bfseries,
+ underlay={%
+ \begin{tcbclipinterior}
+ \shade[
+ inner color=\IfInsideSolutionTF{red!50!yellow}{green!80!yellow},
+ outer color=yellow!10!white]
+ (interior.north west) circle (2cm);
+ \draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
+ (interior.south west) grid (interior.north east);
+ \end{tcbclipinterior}%
+ },
+ attach title to upper=\quad,
+ title = \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}
+ \IfExercisePropertySetT{points}{%
+ (\GetExerciseProperty{points}
+ \IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}})%
+ }]%
+ \IfInsideSolutionT{\label{solution:\ExerciseID}}%
+}{%
+ \endtcolorbox
+ \vspace*{\baselineskip}
+ \IfInsideSolutionTF{%
+ \noindent Exercise~\GetExerciseProperty{counter} is on
+ page~\GetExerciseProperty{page}.%
+ }{%
+ \noindent The solution of this exercise is on
+ page~\pageref{solution:\ExerciseID}.%
+ }%
+ \vspace{\baselineskip}
+}
+
+\xsimsetup{
+ exercise/template = tcolorbox ,
+ solution/template = tcolorbox
+}
+
+\usepackage{fmtcount,etoolbox}
+\newrobustcmd*\mystringnum[2]{\csname#1stringnum\endcsname{#2}}
+\renewcommand*\thechapter{\mystringnum{number}{\value{chapter}}}
+\renewcommand*\thesection{\arabic{chapter}.\arabic{section}}
+
+% for the header: \MakeUppercase{\mystringnum{number}{1}}
+% => \mystringnum{NUMBER}{1}
+% => \NUMBERstringnum{1}
+% elsewhere: \mystringnum{number}{1}
+% => \numberstringnum{1}
+
+\usepackage{totcount}
+\regtotcounter{chapter}
+
+\newcounter{chapters}
+\setcounter{chapters}{1}
+\newcommand*\printsolutionsperchapter{%
+ \whileboolexpr
+ { test { \ifnumless {\value{chapters}} {\totvalue{chapter}+1} } }
+ {%
+ \printsolutions[chapter=\value{chapters},headings-template=per-chapter]
+ \stepcounter{chapters}%
+ }%
+}
+
+\begin{document}
+
+\chapter{The First Chapter}
+
+\begin{exercise}
+ Compute the derivative of the following function:
+ \begin{equation*}
+ f(x) = \sin((\sin x)^2)
+ \end{equation*}
+\end{exercise}
+\begin{solution}
+ The derivative is:
+ \begin{align*}
+ f’(x) &= ( \sin((\sin x)^2) )'
+ = \cos((\sin x)^2) \cdot 2\sin x \cos x
+ \end{align*}
+\end{solution}
+
+\begin{exercise}
+ Compute the derivative of the following function:
+ \begin{equation*}
+ f(x) = \sin((\sin x)^2)
+ \end{equation*}
+\end{exercise}
+\begin{solution}
+ The derivative is:
+ \begin{align*}
+ f’(x) &= ( \sin((\sin x)^2) )'
+ = \cos((\sin x)^2) \cdot 2\sin x \cos x
+ \end{align*}
+\end{solution}
+
+\chapter{The Second Chapter}
+
+\begin{exercise}
+ Compute the derivative of the following function:
+ \begin{equation*}
+ f(x) = (x^2+1) \sqrt{x^4+1}
+ \end{equation*}
+\end{exercise}
+\begin{solution}
+ The derivative is:
+ \begin{align*}
+ f’(x) &= ( (x^2+1) \sqrt{x^4+1} )'
+ = 2x\sqrt{x^4+1} + \frac{2x^3(x^2+1)}{\sqrt{x^4+1}}
+ \end{align*}
+\end{solution}
+
+\clearpage
+\section{Solutions of the Exercices}
+
+\printsolutionsperchapter
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-369065.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-369065.pdf
new file mode 100644
index 0000000000..fea54f626b
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-369065.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-369065.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-369065.tex
new file mode 100644
index 0000000000..f35149c8ea
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-369065.tex
@@ -0,0 +1,73 @@
+% https://tex.stackexchange.com/q/369065/
+\documentclass{article}
+\usepackage{xsim,tcolorbox,needspace}
+
+\xsimsetup{
+ exercise/within=section ,
+ exercise/the-counter = \thesection.\arabic{exercise} ,
+ exercise/template=cyan-box ,
+ exercise/name=Example ,
+ solution/template=red ,
+ solution/print=true
+}
+
+\DeclareExerciseEnvironmentTemplate{cyan-box}{%
+ \begin{tcolorbox}[arc=0mm,boxrule=1pt,colback=white,colframe=cyan,leftrule=3mm]
+ \textsf{%
+ \MakeUppercase{%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ }%
+ }%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}}%
+ \quad
+}{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{red}{%
+ \par
+ \Needspace*{2\baselineskip}
+ \noindent
+ \textsf{\textcolor{red}{\MakeUppercase{\XSIMmixedcase{\GetExerciseName}}}}%
+ \quad
+}{\par\bigskip}
+
+\begin{document}
+
+\section{My first set of exercises}
+\begin{exercise}
+ Prove that $\frac{1}{2}\Delta(f_{ij}f^{ij})
+ =\nabla^{k}f^{ij}+f^{ij}f^{k}[2\nabla_{i}R_{jk}-\nabla_{k}R_{ij}]$
+\end{exercise}
+\begin{solution}
+ From \dots
+\end{solution}
+
+\begin{exercise}
+ Prove that Paulinho is smart.
+\end{exercise}
+\begin{solution}
+ All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart.
+\end{solution}
+
+\begin{exercise}
+ Prove that Paulinho is smart.
+\end{exercise}
+\begin{solution}
+ All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart.
+\end{solution}
+
+\section{My second set of exercises}
+\begin{exercise}
+ Prove that Paulinho is smart.
+\end{exercise}
+\begin{solution}
+ All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart.
+\end{solution}
+
+\begin{exercise}
+ Prove that Paulinho is smart.
+\end{exercise}
+\begin{solution}
+ All ducks are smart. Paulinho is a duck. Therefore, Paulinho is smart.
+\end{solution}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-369636.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-369636.pdf
new file mode 100644
index 0000000000..96bd157b68
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-369636.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-369636.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-369636.tex
new file mode 100644
index 0000000000..73ab7868f6
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-369636.tex
@@ -0,0 +1,43 @@
+% https://tex.stackexchange.com/q/369686/
+\documentclass[a4paper,11pt]{article}
+\usepackage[top=2cm, bottom=3cm, left=4cm, right=4cm]{geometry}
+
+\usepackage[T1]{fontenc}
+\usepackage{fourier}
+\usepackage{tgpagella}
+
+\usepackage{xsim,needspace,adjustbox,scrextend}
+
+\xsimsetup{
+ exercise/the-counter = \arabic{exercise}. ,
+ exercise/template = square
+}
+
+\DeclareExerciseEnvironmentTemplate{square}{%
+ \Needspace*{2\baselineskip}%
+ \addmargin[0pt]{.15\textwidth}%
+ \par\noindent
+ \adjustbox{
+ fbox = 1pt 0pt,
+ lap = {\textwidth},
+ valign = t,
+ set vsize = {0pt}{0pt}
+ }{\rule{0pt}{20pt}\hspace{20pt}}%
+ \textbf{\GetExerciseProperty{counter}} %
+}{\endaddmargin\vspace{\baselineskip}}
+
+\usepackage{lipsum}
+
+\begin{document}
+
+\noindent\hrulefill
+
+\begin{exercise}
+ \lipsum[1]
+\end{exercise}
+
+\begin{exercise}
+ \lipsum[2]
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-369803.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-369803.pdf
new file mode 100644
index 0000000000..3e5f8d663b
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-369803.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-369803.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-369803.tex
new file mode 100644
index 0000000000..e91e795353
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-369803.tex
@@ -0,0 +1,46 @@
+% https://tex.stackexchange.com/q/369803
+\documentclass[a4paper,parskip=half]{scrartcl}
+\usepackage[ngerman]{babel}
+
+\usepackage{amsmath}
+\usepackage{amsthm}
+\usepackage{amsfonts}
+\usepackage{amssymb}
+
+\usepackage[left=2cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
+
+\usepackage{xsim,siunitx}
+\DeclareExerciseTagging{difficulty}
+\DeclareExerciseEnvironmentTemplate{custom}{%
+ \subsection*{%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}%
+ \IfInsideSolutionF{%
+ \IfExercisePropertySetT{subtitle}
+ { {\normalfont(\GetExerciseProperty{subtitle})}}%
+ }%
+ }%
+}{}
+
+\xsimsetup{
+ exercise/name = \XSIMtranslate{question} ,
+ exercise/template=custom ,
+ solution/print=true
+}
+
+\begin{document}
+
+\begin{exercise}[ID=wdsw, subtitle = Widerstandswürfel , difficulty = 2]
+ Gegeben ist ein Würfel, wobei jede der Kanten einen Widerstand von $R =
+ \SI{1}{\ohm}$ hat.
+
+ Wie groß ist der Widerstand entlang einer Raumdiagonale?
+\end{exercise}
+\begin{solution}
+ Wir wollen den Widerstand zwischen den Punkten $X$ und $Y$ bestimmen, also
+ entlang der Raumdiagonale (siehe Abb. \ref{fig:wdsws1}). Weil die
+ Raumdiagonale eine Symmetrieachse ist, sollte das Problem symmetrisch sein,
+ und deswegen eine recht einfache Lösung haben.
+\end{solution}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-370642.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-370642.pdf
new file mode 100644
index 0000000000..7d70b52d3a
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-370642.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-370642.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-370642.tex
new file mode 100644
index 0000000000..99b300c4a0
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-370642.tex
@@ -0,0 +1,25 @@
+% https://tex.stackexchange.com/q/370642/
+\documentclass[a4paper,12pt]{article}
+\usepackage{xsim}
+
+\DeclareExerciseEnvironmentTemplate{simple}
+ {\par\noindent\textbf{\GetExerciseProperty{counter}}. }
+ {\par}
+\xsimsetup{exercise/template=simple}
+
+\begin{document}
+
+\begin{exercise}\label{eq1}
+ Let $X$ be such that\dots
+\end{exercise}
+
+\begin{exercise}
+ In this exercise consider $Y=2$ \dots
+\end{exercise}
+
+\begin{exercise}
+ Consider $X$ as in exercise~\ref{eq1} (I would like to see the issue
+ number~1)
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-391530-exercises.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-391530-exercises.tex
new file mode 100644
index 0000000000..716921adc0
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-391530-exercises.tex
@@ -0,0 +1,12 @@
+\begin{question}
+ Who is the Defence Minister?
+\end{question}
+\begin{question}
+ Who is the Home Minister?
+\end{question}
+\begin{question}
+ Who is the Finance Minister?
+\end{question}
+\begin{question}
+ Who is the External Affairs Minister?
+\end{question}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-391530.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-391530.pdf
new file mode 100644
index 0000000000..1446d0345e
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-391530.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-391530.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-391530.tex
new file mode 100644
index 0000000000..2d76cae57e
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-391530.tex
@@ -0,0 +1,56 @@
+% https://tex.stackexchange.com/q/391530
+\documentclass{article}
+\usepackage{xsim}
+
+\DeclareExerciseType{subquestion}{
+ exercise-env = question ,
+ solution-env = answer ,
+ exercise-name = Question ,
+ solution-name = Answer ,
+ exercise-template = item ,
+ solution-template = item
+}
+
+\DeclareExerciseProperty{title}
+
+\makeatletter
+\DeclareExerciseEnvironmentTemplate{named}{%
+ \subsection*{%
+ \GetExercisePropertyTF{title}
+ {#1}
+ {??\@latex@warning{Please give an exercise title}}%
+ }%
+}{}
+\makeatother
+
+\DeclareExerciseEnvironmentTemplate{item}{\item}{}
+\DeclareExerciseCollection{exercise-pool}
+
+\xsimsetup{ exercise/template = named }
+
+\begin{document}
+
+\collectexercises{exercise-pool}
+\begin{question}
+ Who is the Defence Minister?
+\end{question}
+\begin{question}
+ Who is the Home Minister?
+\end{question}
+\begin{question}
+ Who is the Finance Minister?
+\end{question}
+\begin{question}
+ Who is the External Affairs Minister?
+\end{question}
+\collectexercisesstop{exercise-pool}
+
+\begin{exercise}[title=Answer the following in one sentence:]
+ \begin{enumerate}
+ \item Who is the President?
+ \item Who is the Prime Minister?
+ \printrandomexercises[collection=exercise-pool]{2}
+ \end{enumerate}
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-395273.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-395273.pdf
new file mode 100644
index 0000000000..056b14e833
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-395273.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-395273.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-395273.tex
new file mode 100644
index 0000000000..fe6152ed96
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-395273.tex
@@ -0,0 +1,74 @@
+\documentclass{article}
+\usepackage{xsim,tcolorbox,needspace}
+
+% declare a boolean property:
+\DeclareExerciseProperty*{short}
+% declare a tag like property:
+\DeclareExerciseTagging{level}
+
+% declare a template which typesets exercises differently according to given
+% properties:
+\DeclareExerciseEnvironmentTemplate{exercise}
+ {%
+ \renewcommand*\theenumi{\theexercise.\arabic{enumi}}%
+ \par\addvspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \GetExercisePropertyT{level}{\marginpar{\sffamily Level: #1}}%
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}.} %
+ \GetExercisePropertyT{subtitle}{\textit{#1}}%
+ \IfExerciseBooleanPropertyF{short}{\par\noindent}%
+ }
+ {}
+
+% declare a tcolorbox template for the solutions:
+\DeclareExerciseEnvironmentTemplate{solution}
+ {\tcolorbox[colback=yellow,colframe=red]}
+ {\endtcolorbox}
+
+% declare a user command for short answers:
+\NewDocumentCommand\answer{m}{%
+ \IfSolutionPrintT{%
+ \UseExerciseTemplate{begin}{solution}%
+ #1%
+ \UseExerciseTemplate{end}{solution}%
+ }{}%
+}
+
+% setup exercises and solutions:
+\SetExerciseParameters{exercise}{
+ exercise-template = exercise ,
+ solution-template = solution
+}
+
+% remove this option to hide the answers:
+\xsimsetup{solution/print=true}
+
+\usepackage{lipsum}
+
+\begin{document}
+
+\begin{exercise}[level=hard,short]
+ Just a short exercise
+\end{exercise}
+\begin{solution}
+ The somewhat longer solution to the short exercise. \lipsum[1]
+\end{solution}
+
+\begin{exercise}[subtitle=This one has a title,level=easy]
+ Answer the following questions.
+ \begin{enumerate}
+ \item question \answer{answer}
+ \item question \answer{answer}
+ \end{enumerate}
+\end{exercise}
+
+\begin{exercise}
+ A long exercise. \lipsum[4]\answer{The answer}
+\end{exercise}
+
+\begin{exercise}[level=medium,short]
+ Another short exercise.\answer{The answer}
+\end{exercise}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-466584.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-466584.pdf
new file mode 100644
index 0000000000..83c20f646b
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-466584.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-466584.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-466584.tex
new file mode 100644
index 0000000000..1f30d3c1b8
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-466584.tex
@@ -0,0 +1,56 @@
+% https://tex.stackexchange.com/q/466584
+\documentclass{article}
+\usepackage{xsim}
+\usepackage{needspace}
+\usepackage{tasks}
+
+\DeclareExerciseEnvironmentTemplate{exandsol}{%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent\sffamily
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{\hspace{3em}{\small#1}}\par
+ \normalfont
+}{}
+
+\DeclareExerciseEnvironmentTemplate{flushright}{%
+ \begin{flushright}
+ \begin{minipage}{.4\linewidth}
+ \textsf{Solutions:}\par\normalfont
+}{%
+ \end{minipage}%
+ \end{flushright}%
+}
+
+\xsimsetup{
+ exercise/within = section ,
+ exercise/template = exandsol ,
+ solution/template = flushright ,
+ solution/print = true
+}
+
+\renewcommand*\theexercise{\thesection-\arabic{exercise}}
+\newcommand\QA[2]{\IfInsideSolutionTF{#2}{#1}}
+
+\newcommand*\answer[1]{%
+ \begingroup
+ \def\ExerciseType{exercise}%
+ \IfSolutionPrintT{\printsolution{exercise}{#1}}%
+ \endgroup
+}
+
+\begin{document}
+
+\setcounter{section}{1}
+\setcounter{exercise}{30}
+
+\begin{exercise}[ID=one,solution,subtitle=Factorize as much as possible the following expressions.]
+ \begin{tasks}
+ \task \QA{$(2x-3)^2 - (3x-2)^2 =$}{$-(x+5)(5x-1)$}
+ \task \QA{$(x^2-25) - 2(5-x)(x+6) =$}{$(x+5)(3x-17)$}
+ \task \QA{$2x(x+2) + (x+1)^2 + 2 =$}{$3(x+1)^2$}
+ \end{tasks}
+\end{exercise}
+\answer{one}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-498299.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-498299.pdf
new file mode 100644
index 0000000000..41c97e7254
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-498299.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-498299.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-498299.tex
new file mode 100644
index 0000000000..6b37b4c518
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-498299.tex
@@ -0,0 +1,76 @@
+% https://tex.stackexchange.com/q/498299
+\documentclass{article}
+\usepackage[no-files]{xsim}
+\usepackage{tasks}
+
+\DeclareExerciseEnvironmentTemplate{item}
+ {\item[\GetExerciseProperty{counter}]}
+ {}
+
+\DeclareExerciseProperty{answer}
+
+\newcommand*\answer[1]{%
+ \XSIMexpandcode{%
+ \SetExerciseProperty{answer}
+ { (\noexpand\textit{\alph{task}}) \unexpanded{#1}}}%
+ #1%
+}
+
+\newcommand*\getanswers{%
+ \def\betweenanswers{\def\betweenanswers{\hspace{2em}}}%
+ \ForEachUsedExerciseByID{%
+ \betweenanswers##3\ExercisePropertyGet{##1}{##2}{answer}%
+ }%
+}
+
+\xsimsetup{
+ exercise/template = item,
+ exercise/the-counter = \arabic{exercise}.
+}
+
+\NewTasksEnvironment[
+ label = (\textit{\alph*}) ,
+ label-width = 14pt
+]{choice}[\choice]
+
+\newenvironment{questions}
+ {\itemize}
+ {\enditemize}
+
+\begin{document}
+
+\section{Problems}
+\begin{questions}
+ \begin{exercise}
+ What is the product of $-2$ and $3$?
+ \begin{choice}(4)
+ \choice \answer{$-6$}
+ \choice $6$
+ \choice $5$
+ \choice $-5$
+ \end{choice}
+ \end{exercise}
+ \begin{exercise}
+ What is the sum of the sides of a polygon called?
+ \begin{choice}(2)
+ \choice Leg
+ \choice \answer{Perimeter}
+ \choice Area
+ \choice Volume
+ \end{choice}
+ \end{exercise}
+ \begin{exercise}
+ What is the sum of $-2$ and $-3$?
+ \begin{choice}(4)
+ \choice $-6$
+ \choice $6$
+ \choice $5$
+ \choice \answer{$-5$}
+ \end{choice}
+ \end{exercise}
+\end{questions}
+
+\section{Answers}
+\getanswers
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-576998.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-576998.pdf
new file mode 100644
index 0000000000..b3aa836926
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-576998.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-576998.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-576998.tex
new file mode 100644
index 0000000000..ee2947bbb5
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-576998.tex
@@ -0,0 +1,135 @@
+% https://tex.stackexchange.com/q/576998
+\documentclass[twocolumn]{book}
+\usepackage{xsim}
+
+\DeclareExerciseEnvironmentTemplate{number-only}{%
+ \par\noindent
+ \textbf{\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}} %
+}{\par}
+
+\newcommand\printsectionexercises{%
+ \ForEachUsedExerciseByType{%
+ \ifnum\ExercisePropertyGet{##1}{##2}{chapter-value}=\value{chapter}
+ \ifnum\ExercisePropertyGet{##1}{##2}{section-value}=\value{section}
+ \XSIMprint{exercise}{##1}{##2}%
+ \fi
+ \fi
+ }%
+}
+
+\renewcommand\printsolutions{%
+ \def\currentchapter{}%
+ \def\currentsection{}%
+ \def\lastchapter{}%
+ \def\lastsection{}%
+ \ForEachUsedExerciseByType{%
+ \let\lastchapter\currentchapter
+ \let\lastsection\currentsection
+ \edef\currentchapter{\ExercisePropertyGet{##1}{##2}{chapter-value}}%
+ \edef\currentsection{\ExercisePropertyGet{##1}{##2}{section-value}}%
+ \ifx\lastchapter\currentchapter\else
+ \section*{Chapter \ExercisePropertyGet{##1}{##2}{chapter}}
+ \fi
+ \ifx\lastsection\currentsection\else
+ \subsection*{Exercises \ExercisePropertyGet{##1}{##2}{section}}
+ \fi
+ \XSIMprint{solution}{##1}{##2}%
+ }%
+}
+
+\xsimsetup{
+ exercise/template = number-only ,
+ solution/template = number-only ,
+ exercise/within = section ,
+ exercise/the-counter = \arabic{exercise}. ,
+ exercise/print = false
+}
+
+\begin{document}
+
+\setcounter{chapter}{13}
+\chapter{}
+\section{Cats as pets}
+Text text text\dots
+\begin{exercise}
+ Draw a cat.
+\end{exercise}
+\begin{solution}
+ Drawing a cat.
+\end{solution}
+
+Text text text\dots
+\begin{exercise}
+ Bathe a cat.
+\end{exercise}
+\begin{solution}
+ Bathing a cat.
+\end{solution}
+
+Text text text\dots
+\begin{exercise}
+ Trace the history of cats through time.
+\end{exercise}
+\begin{solution}
+ Tracing the history of cats through time.
+\end{solution}
+
+\subsection*{Exercises \thesection}
+\printsectionexercises
+
+\section{Frogs as pets}
+Text text text\dots
+\begin{exercise}
+ Lick a frog.
+\end{exercise}
+\begin{solution}
+ Licking a frog.
+\end{solution}
+
+Text text text\dots
+\begin{exercise}
+ Bathe a frog.
+\end{exercise}
+\begin{solution}
+ Bathing a frog.
+\end{solution}
+
+Text text text\dots
+\begin{exercise}
+ Feed a frog.
+\end{exercise}
+\begin{solution}
+ Feeding a frog.
+\end{solution}
+
+\subsection*{Exercises \thesection}
+\printsectionexercises
+
+\setcounter{chapter}{20}
+\chapter{}
+
+\section{The joys of fish}
+Text text text\dots
+\begin{exercise}
+ Catch a fish.
+\end{exercise}
+\begin{solution}
+ Catching a fish.
+\end{solution}
+
+Text text text\dots
+\begin{exercise}
+ Draw a fish.
+\end{exercise}
+\begin{solution}
+ Drawing a fish.
+\end{solution}
+
+\subsection*{Exercises \thesection}
+\printsectionexercises
+
+\chapter*{Solutions to the exercises}
+\printsolutions
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-580636.pdf b/macros/latex/contrib/xsim/examples/xsim.texsx-580636.pdf
new file mode 100644
index 0000000000..d51eb48607
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-580636.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texsx-580636.tex b/macros/latex/contrib/xsim/examples/xsim.texsx-580636.tex
new file mode 100644
index 0000000000..a6f2be6651
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texsx-580636.tex
@@ -0,0 +1,92 @@
+% https://tex.stackexchange.com/q/580636/
+\documentclass{article}
+\usepackage[use-files]{xsim}
+
+\usepackage[colorlinks,allcolors=blue]{hyperref}
+
+\DeclareExerciseProperty{hints}
+\newcounter{hint}
+\renewcommand\theHhint{\ExerciseID.\arabic{hint}}
+\newcounter{hints}
+\newcounter{step}
+
+\NewDocumentEnvironment{hint}{}{%
+ \stepcounter{hint}%
+ \XSIMsetfilebegin{%
+ \par
+ \refstepcounter{hint}\label{hint:\ExerciseID:\arabic{hint}}%
+ \noindent\textbf{Hint~\thehint\ to exercise \GetExerciseProperty{counter}}%
+ \hfill Back to exercise \ref{ex:\ExerciseID}\par
+ \noindent
+ }%
+ \XSIMsetfileend{\par\addvspace{\bigskipamount}}%
+ \XSIMfilewritestart{\jobname-hint-\ExerciseID-\arabic{hint}.tex}%
+}{%
+ \XSIMfilewritestop
+ \stepcounter{hints}%
+ \SetExpandedExerciseProperty{hints}{\arabic{hints}}%
+}
+
+\DeclareExerciseEnvironmentTemplate{hints}{%
+ \setcounter{hint}{0}%
+ \setcounter{hints}{0}%
+ \par\noindent
+ \textbf{\XSIMmixedcase{\GetExerciseName}\GetExerciseProperty{counter}:}\hfill
+ \IfExercisePropertySetT{hints}{%
+ \setcounter{step}{0}%
+ \def\hintcomma{\def\hintcomma{, }}%
+ Hint\ifnum\GetExerciseProperty{hints}=1\else s\fi:
+ \loop\unless\ifnum\value{step}=\GetExerciseProperty{hints}
+ \stepcounter{step}%
+ \hintcomma\ref{hint:\ExerciseID:\arabic{step}}%
+ \repeat
+ \par\noindent
+ }%
+}{\par\addvspace{\bigskipamount}}
+
+\xsimsetup{
+ exercise/within = section ,
+ exercise/begin-hook = \label{ex:\ExerciseID} ,
+ exercise/template = hints
+}
+
+\newcommand\printhints{%
+ \ForEachUsedExerciseByType{%
+ \setcounter{step}{0}%
+ \setcounter{hint}{0}%
+ \loop\unless\ifnum\value{step}=\GetExerciseProperty{hints}
+ \stepcounter{step}%
+ \input{\jobname-hint-\ExerciseID-\arabic{step}.tex}%
+ \repeat
+ }%
+}
+
+\begin{document}
+
+\section{Exercises}
+\begin{exercise}
+ Description of the exercise. Run the following command
+\begin{verbatim}
+print("Hello world")
+Verbatim &^%$&\content
+\end{verbatim}
+\begin{hint}
+ Run the example from the command line with the python command.
+\end{hint}
+\begin{hint}
+ The solution is 42.
+\end{hint}
+\end{exercise}
+
+\begin{exercise}
+ Another exercise
+\begin{hint}
+ The first ten million years were the worst. Some \verb+&$+.
+\end{hint}
+\end{exercise}
+
+
+\section{Hints}
+\printhints
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texwelt-15093.pdf b/macros/latex/contrib/xsim/examples/xsim.texwelt-15093.pdf
new file mode 100644
index 0000000000..b58d959599
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texwelt-15093.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texwelt-15093.tex b/macros/latex/contrib/xsim/examples/xsim.texwelt-15093.tex
new file mode 100644
index 0000000000..d003cc03af
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texwelt-15093.tex
@@ -0,0 +1,132 @@
+% http://texwelt.de/wissen/fragen/15093/
+\documentclass[paper=a4]{scrartcl}
+\usepackage[ngerman]{babel}
+
+\usepackage{xsim,needspace}
+
+\DeclareExerciseTagging{AFB}
+\DeclareExerciseEnvironmentTemplate{myexam}
+ {
+ \par\vspace{\baselineskip}
+ \Needspace*{3\baselineskip}
+ \noindent
+ \textbf{\IfInsideSolutionTF{Lösung}{Aufgabe}~\GetExerciseProperty{counter}.}%
+ \GetExercisePropertyT{subtitle}{\quad\textit{#1}}%
+ \hfill
+ \GetExercisePropertyT{AFB}{Schwierigkeit: #1}%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \PropertyValue
+ \GetExercisePropertyT{bonus-points}{+\PropertyValue}%
+ \,P.%
+ }%
+ }%
+ \par\noindent
+ }
+ {}
+
+\xsimsetup{exercise/template=myexam}
+
+\begin{document}
+
+\begin{exercise}[subtitle=Eine Frage, AFB=1, points=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[AFB=2, points=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[AFB=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[subtitle=Eine andere Frage, AFB=4, points=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[subtitle=Eine Frage, AFB=2]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\end{document}
+
+% andere Idee:
+\documentclass[paper=a4]{scrartcl}
+\usepackage[utf8]{inputenc}
+\usepackage[ngerman]{babel}
+
+\usepackage{xsim}
+
+\DeclareExerciseTagging{AFB}
+
+\DeclareExerciseEnvironmentTemplate{AFB}{%
+ \subsection*{%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{subtitle}%
+ { {\normalfont\itshape\GetExerciseProperty{subtitle}}}%
+ }
+ \marginpar{%
+ \GetExercisePropertyT{AFB}{%
+ \leavevmode\llap{Schwierigkeit: \PropertyValue\hspace*{\marginparsep}}%
+ }%
+ \GetExercisePropertyT{points}{%
+ \PropertyValue
+ \nobreakspace\XSIMtranslate{points}%
+ }%
+ }%
+}{}
+
+\DeclareExerciseEnvironmentTemplate{AFBsol}{%
+ \subsection*{%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{subtitle}%
+ { {\normalfont\itshape\GetExerciseProperty{subtitle}}}%
+ }
+ \textit{\small
+ \GetExercisePropertyT{AFB}{Schwierigkeit: \PropertyValue}%
+ \GetExercisePropertyT{points}{%
+ \IfExercisePropertySetT{AFB}{ }%
+ (\PropertyValue\nobreakspace\XSIMtranslate{points})%
+ }%
+ }%
+ \par\noindent
+}{}
+
+\DeclareExerciseTranslation{German}{default-heading}{Lösungen}
+
+\xsimsetup{
+ exercise/template=AFB ,
+ solution/template=AFBsol ,
+ exercise/name=Aufgabe
+}
+
+\begin{document}
+
+\begin{exercise}[subtitle=Eine Frage, AFB=1, points=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+\begin{solution}
+ Das ist eine tolle Lösung!
+\end{solution}
+\begin{exercise}[AFB=2, points=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[AFB=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[subtitle=Eine andere Frage, AFB=4, points=3]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\begin{exercise}[subtitle=Eine Frage, AFB=2]
+ Das ist eine sehr tolle Frage.
+\end{exercise}
+
+\printsolutions
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texwelt-23968.pdf b/macros/latex/contrib/xsim/examples/xsim.texwelt-23968.pdf
new file mode 100644
index 0000000000..ac8b2c3d39
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texwelt-23968.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texwelt-23968.tex b/macros/latex/contrib/xsim/examples/xsim.texwelt-23968.tex
new file mode 100644
index 0000000000..5203bdee8a
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texwelt-23968.tex
@@ -0,0 +1,65 @@
+% http://texwelt.de/wissen/fragen/23968/
+\documentclass{article}
+\usepackage{xsim}
+
+% new property:
+\DeclareExerciseProperty{shortsolution}
+
+% new environment:
+\NewDocumentEnvironment{shortsolution}{+b}
+ {%
+ \edef\ExerciseType{\csname g_xsim_exercise_type_tl\endcsname}%
+ \edef\ExerciseID{\csname g_xsim_exercise_id_tl\endcsname}%
+ \SetExerciseProperty{shortsolution}{#1}%
+ }
+ {}
+
+% we'll use a description list for the list of short solutions:
+\newcommand\printshortsolutions{%
+ \begin{description}
+ \ForEachUsedExerciseByType{%
+ \GetExercisePropertyT{shortsolution}
+ {\item[Short Solution ##3]####1}%
+ }%
+ \end{description}
+}
+
+\begin{document}
+
+\section{Problems}
+% set shortsolution through option:
+\begin{exercise}[subtitle=Pythagoras]
+ This is the first problem.
+\end{exercise}
+\begin{shortsolution}
+ This is a shortsolution to the first problem.
+\end{shortsolution}
+\begin{solution}
+ This is the solution to the first problem.
+\end{solution}
+
+\begin{exercise}[subtitle=Another Problem]
+ This is the second problem.
+\end{exercise}
+\begin{solution}
+ This is the solution to the second problem.
+\end{solution}
+
+% set shortsolution with custom command:
+\begin{exercise}[subtitle=Yet Another Problem]
+ This is the third problem.
+\end{exercise}
+\begin{shortsolution}
+ This is a shortsolution to the third problem.
+\end{shortsolution}
+\begin{solution}
+ This is the solution to the third problem.
+\end{solution}
+
+\section{Shortsolutions}
+\printshortsolutions
+
+\section{Solutions}
+\printsolutions[headings=false]
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.texwelt-6698.pdf b/macros/latex/contrib/xsim/examples/xsim.texwelt-6698.pdf
new file mode 100644
index 0000000000..f8b9609328
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texwelt-6698.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.texwelt-6698.tex b/macros/latex/contrib/xsim/examples/xsim.texwelt-6698.tex
new file mode 100644
index 0000000000..51523e8bcd
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.texwelt-6698.tex
@@ -0,0 +1,85 @@
+% http://texwelt.de/wissen/fragen/6698/
+\documentclass{article}
+\usepackage[ngerman]{babel}
+
+\usepackage{needspace}
+\usepackage{xsim}
+\xsimsetup{
+ exercise/name = Aufgabe ,
+ solution/name = Lösung ,
+ exercise/within = section ,
+ exercise/the-counter = \thesection.\arabic{exercise} ,
+ exercise/template = mine
+}
+
+\newif\iflist
+
+\DeclareExerciseEnvironmentTemplate{mine}{
+ \par\vspace{\baselineskip}
+ \Needspace*{3\baselineskip}
+ \noindent
+ \textbf{\GetExerciseName~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{\quad\textit{#1}}%
+ \iflist
+ \GetExercisePropertyT{page}{ (Seite~#1)}%
+ \fi
+ % not necessary if you don't use points:
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \PropertyValue
+ \GetExercisePropertyT{bonus-points}{+\PropertyValue}%
+ \,\XSIMtranslate{points-abbr}%
+ }%
+ }%
+ \par\noindent
+}
+{}
+
+\usepackage{multicol}
+
+\begin{document}
+
+\section{Erstes Kapitel}
+\begin{exercise}
+ Eine erste Aufgabe
+\end{exercise}
+\begin{exercise}
+ Eine zweite Aufgabe
+\end{exercise}
+
+\subsection{Erstes Unterkapitel}
+\begin{exercise}
+ Eine Aufgabe in einem Unterkapitel
+\end{exercise}
+\begin{exercise}
+ Noch eine Aufgabe in einem Unterkapitel
+\end{exercise}
+
+\subsubsection{Tiefer geschachteltes Unterkapitel}
+\begin{exercise}
+ Noch eine Aufgabe
+\end{exercise}
+
+\subsubsection{Weiter geschachtelt}
+\begin{exercise}
+ Eine weitere Aufgabe
+\end{exercise}
+
+\subsection{Zweites Unterkapitel}
+\begin{exercise}
+ Und eine weitere Aufgabe
+\end{exercise}
+
+\clearpage
+
+\section{Zweites Kapitel}
+\begin{exercise}
+ Eine Aufgabe in einem anderen Kapitel
+\end{exercise}
+
+\begin{multicols}{2}[\section{Aufgabenübersicht}]
+ \listtrue
+ \printcollection{all exercises}
+\end{multicols}
+
+\end{document}
diff --git a/macros/latex/contrib/xsim/examples/xsim.various.pdf b/macros/latex/contrib/xsim/examples/xsim.various.pdf
new file mode 100644
index 0000000000..aba5075c38
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.various.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/examples/xsim.various.tex b/macros/latex/contrib/xsim/examples/xsim.various.tex
new file mode 100644
index 0000000000..5543010324
--- /dev/null
+++ b/macros/latex/contrib/xsim/examples/xsim.various.tex
@@ -0,0 +1,238 @@
+\documentclass{article}
+\usepackage[use-files]{xsim}
+\usepackage{lipsum,tcolorbox}
+
+\DeclareExerciseType{question}{
+ exercise-env = question ,
+ solution-env = hint ,
+ exercise-name = Question ,
+ solution-name = Hint ,
+ exercise-template = default ,
+ solution-template = default ,
+ counter = exercise % shares a counter with the `exercise' type
+}
+
+\DeclareExerciseType{problem}{
+ exercise-env = problem ,
+ solution-env = answer ,
+ exercise-name = Problem ,
+ solution-name = Answer ,
+ exercise-template = tcolorbox ,
+ solution-template = tcolorbox
+}
+
+\DeclareExerciseProperty{grade}
+\DeclareExerciseProperty{difficulty}
+
+\tcbuselibrary{breakable}
+\DeclareExerciseEnvironmentTemplate{tcolorbox}
+ {%
+ \newcommand*\writehere{%
+ \IfInsideSolutionTF{}{%
+ \tcblower
+ \emph{Your answer:}
+ \vspace*{4cm}
+ }%
+ }
+ \vspace{\baselineskip}
+ \tcolorbox[
+ colback = red!5!white ,
+ colframe = red!75!black ,
+ colbacktitle = yellow!50!red ,
+ coltitle = red!25!black ,
+ fonttitle = \bfseries ,
+ subtitle style = {
+ boxrule = 0.4pt ,
+ colback = yellow!50!red!25!white
+ } ,
+ breakable ,
+ title = \GetExerciseName~\GetExerciseProperty{counter}
+ \IfExercisePropertySetT{points}{%
+ (\GetExerciseProperty{points}
+ \IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}})%
+ }]
+ \IfInsideSolutionF{%
+ \IfExercisePropertySetT{tags}{%
+ Tags: \ListExerciseTags{tags}{, } \par
+ }%
+ }%
+ }
+ {%
+ \endtcolorbox
+ \vspace{\baselineskip}
+ }
+
+\xsimsetup{
+ % tags = {geometry} ,
+ % topics = {geometry}
+ % tags/ingore-untagged % if true untagged exercise will be printed regardless
+ % % which tags have been chosen
+}
+
+\begin{document}
+
+\gradingtable \par \bigskip
+
+Total: \printtotalpoints \par
+from questions: \printpoints{question} \par
+from exercises: \printpoints{exercise} \par
+from problems: \printpoints{problem} \par \bigskip
+
+Total bonus: \printtotalbonus \par
+from questions: \printbonus{question} \par
+from exercises: \printbonus{exercise} \par
+from problems: \printbonus{problem} \par
+
+% 1
+\begin{exercise}[points=4,bonus-points=1,topics=geometry,tags={geometry,triangles},grade=7]
+ \lipsum[1]
+\begin{verbatim}
+foo x^2 y^3 \gna
+\end{verbatim}
+\end{exercise}
+\begin{solution}[print]
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\begin{verbatim}
+foo x^2 y^3 \gna
+\end{verbatim}
+\end{solution}
+
+% 2
+\begin{exercise}[subtitle=Foo,points=5,topics=analysis,tags={analysis,functions},grade=11]
+ \lipsum[2]
+\end{exercise}
+\begin{solution}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{solution}
+
+% 3
+\begin{problem}[tags={analysis,functions}]
+ \lipsum[3]
+ \writehere
+\end{problem}
+\begin{answer}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{answer}
+
+% 4
+\begin{question}
+ \lipsum[4]
+
+ \verb+\ExerciseID+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id}
+
+ \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID}
+\end{question}
+\begin{hint}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{hint}
+
+% 5
+\begin{problem}[points=2]
+ \lipsum[3]
+
+ \verb+\ExerciseID+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id}
+
+ \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID}
+ \writehere
+\end{problem}
+\begin{answer}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{answer}
+
+% 6
+\begin{problem}[points=1]
+ \lipsum[3]
+
+ \verb+\ExerciseID+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id}
+
+ \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID}
+\end{problem}
+\begin{answer}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{answer}
+
+% 7
+\begin{exercise}[ID=test]
+ \lipsum[5]
+
+ \verb+\ExerciseID+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{id}+: \GetExerciseProperty{id}
+
+ \verb+\GetExerciseAliasProperty{ID}+: \GetExerciseAliasProperty{ID}
+
+ \verb+\GetExerciseProperty{ID}+: \GetExerciseProperty{ID}
+\end{exercise}
+\begin{solution}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{solution}
+
+% 8
+\begin{exercise}[print=false,use=false]
+ \lipsum[5]
+\end{exercise}
+\begin{solution}
+ This is the solution to \ExerciseType\ \GetExerciseProperty{counter}.
+\end{solution}
+
+% \printsolutionstype{exercise}
+
+\printsolutions*
+
+\section{Statistics}
+
+\ForEachUsedExerciseByType{%
+ \noindent\XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name}}~#3: \\
+ \hspace*{2em}id: #2, type: #1, subtitle: #4, points: #5, bonus: #6\par \medskip
+}
+
+\bigskip
+
+\ForEachUsedExerciseByID{%
+ \noindent\XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name}}~#3: \\
+ \hspace*{2em}id: #2, type: #1, subtitle: #4, points: #5, bonus: #6\par \medskip
+}
+
+\bigskip
+
+\ForEachUsedExerciseByType{%
+ \ExercisePropertyIfSetT{#1}{#2}{points}
+ { \XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name}}~#3: #5~points\par }%
+}
+
+\bigskip
+
+Number of questions: \numberofquestions \par
+Number of exercises: \numberofexercises \par
+Number of problems: \numberofproblems
+
+\section{Grading tables}
+
+\gradingtable[template=default*,type=exercise] \par \bigskip
+
+\gradingtable[template=default*,type=problem] \par \bigskip
+
+\gradingtable[template=default*] \par \bigskip
+
+% vertical
+\gradingtable[type=exercise] \par \bigskip
+
+\gradingtable[type=problem] \par \bigskip
+
+\gradingtable
+
+\end{document}