diff options
author | Norbert Preining <norbert@preining.info> | 2021-02-01 03:00:47 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-02-01 03:00:47 +0000 |
commit | 87c74b3292e1c3efc4427ae0536a1d30a0dc8e4b (patch) | |
tree | 219447f0cb875a4889a8cac2bea6deb012b7ca7b /macros/latex/contrib/xsim/doc/examples/xsim.texwelt-23968.tex | |
parent | 8eab566745f1c61319c17e6a1aeea0f18bcfc34c (diff) |
CTAN sync 202102010300
Diffstat (limited to 'macros/latex/contrib/xsim/doc/examples/xsim.texwelt-23968.tex')
-rw-r--r-- | macros/latex/contrib/xsim/doc/examples/xsim.texwelt-23968.tex | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/macros/latex/contrib/xsim/doc/examples/xsim.texwelt-23968.tex b/macros/latex/contrib/xsim/doc/examples/xsim.texwelt-23968.tex deleted file mode 100644 index bf205bb7fb..0000000000 --- a/macros/latex/contrib/xsim/doc/examples/xsim.texwelt-23968.tex +++ /dev/null @@ -1,70 +0,0 @@ -% 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{% - \def\ExerciseType{##1}% - \def\ExerciseID{##2}% - \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} |