summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex')
-rw-r--r--Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex67
1 files changed, 67 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-305110.tex
new file mode 100644
index 00000000000..c10928da0ce
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/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}