diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-13 21:43:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-13 21:43:03 +0000 |
commit | 59e719d7e1969d25917e37c43d81239fa593396a (patch) | |
tree | 6097b5adce2ecaf15fa76068cfdd058cd41c1158 /Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex | |
parent | e0ce141fcde2bce358ce1f883ceff960742cae4a (diff) |
xsim (13oct19)
git-svn-id: svn://tug.org/texlive/trunk@52371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex index 02fb1444f71..2a7add33de4 100644 --- a/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex +++ b/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex @@ -42,6 +42,11 @@ \DeclareExerciseParameter* {solution-counter} \DeclareExerciseParameter* {number} +% these are additional - but are used in the `default' environment +% template: +\DeclareExerciseParameter {exercise-heading} +\DeclareExerciseParameter {solution-heading} + % ---------------------------------------------------------------------------- % not exactly a user choice, must be present at various places: @@ -63,7 +68,9 @@ \DeclareExerciseProperty {sectioning} % those are additional and wouldn't *need* to be present except for -% pre-defined templates which make use of them: +% pre-defined templates which make use of them (the page and page-value +% property actually needs to be defined for xsim to be able to save the +% corresponding values): \DeclareExerciseProperty {subtitle} \DeclareExerciseProperty {points} \DeclareExerciseProperty {bonus-points} @@ -166,23 +173,25 @@ solution-name = \XSIMtranslate {solution} , solutions-name = \XSIMtranslate {solutions} , exercise-template = default , - solution-template = default + solution-template = default , + exercise-heading = \subsection* , + solution-heading = \subsection* } % ---------------------------------------------------------------------------- \DeclareExerciseEnvironmentTemplate {default} { - \subsection* - { - \XSIMmixedcase { \GetExerciseName } \nobreakspace - \GetExerciseProperty {counter} - \IfInsideSolutionF - { - \IfExercisePropertySetT {subtitle} - { ~ { \normalfont \itshape \GetExerciseProperty {subtitle} } } - } - } + \GetExerciseHeadingF { \subsection* } + { + \XSIMmixedcase { \GetExerciseName } \nobreakspace + \GetExerciseProperty {counter} + \IfInsideSolutionF + { + \IfExercisePropertySetT {subtitle} + { ~ { \normalfont \itshape \GetExerciseProperty {subtitle} } } + } + } \GetExercisePropertyT {points} { \marginpar @@ -195,7 +204,7 @@ } } } - {} + { \par } % ---------------------------------------------------------------------------- |