diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.pointsums.tex new file mode 100644 index 00000000000..29d7ac0cdc1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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} |