diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex index 2c9f0c56449..32beb122083 100644 --- a/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex +++ b/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex @@ -8,7 +8,7 @@ % Web: https://github.com/cgnieder/xsim % E-Mail: contact@mychemistry.eu % ---------------------------------------------------------------------------- -% Copyright 2017 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -146,11 +146,11 @@ { \xsim_make_property_alias:nn {#1} {#2} } \@onlypreamble \DeclareExercisePropertyAlias -\NewDocumentCommand \SetExerciseProperty {mmm+m} - { \xsim_set_property:xxnn {\ExerciseType} {\ExerciseID} {#3} {#4} } +\NewDocumentCommand \SetExerciseProperty {m+m} + { \xsim_set_property:xxnn {\ExerciseType} {\ExerciseID} {#1} {#2} } -\NewDocumentCommand \SetExpandedExerciseProperty {mmm+m} - { \xsim_set_property:xxnx {\ExerciseType} {\ExerciseID} {#3} {#4} } +\NewDocumentCommand \SetExpandedExerciseProperty {m+m} + { \xsim_set_property:xxnx {\ExerciseType} {\ExerciseID} {#1} {#2} } \NewDocumentCommand \ExerciseSetProperty {mmm+m} { \xsim_set_property:nnnn {#1} {#2} {#3} {#4} } @@ -443,6 +443,13 @@ { \xsim_new_tag_type:n {#1} } \@onlypreamble \DeclareExerciseTagging +\NewDocumentCommand \ProvideExerciseTagging {m} + { + \xsim_if_tag_type_exists:nTF {#1} + { \msg_warning:nnn {xsim} {tag-exists} {#1} } + { \xsim_new_tag_type:n {#1} } + } + \NewDocumentCommand \ForEachExerciseTag {m+m} { \xsim_foreach_exercise_tag:oonn {\ExerciseType} {\ExerciseID} {#1} {#2} } @@ -460,6 +467,20 @@ {#4} } +\NewDocumentCommand \IfExerciseTagSetTF {m+m+m} + { \xsim_if_tags_value:nTF {#1} {#2} {#3} } +\NewDocumentCommand \IfExerciseTagSetT {m+m} + { \xsim_if_tags_value:nT {#1} {#2} } +\NewDocumentCommand \IfExerciseTagSetF {m+m} + { \xsim_if_tags_value:nF {#1} {#2} } + +\NewDocumentCommand \IfExerciseTopicSetTF {m+m+m} + { \xsim_if_topic_value:nTF {#1} {#2} {#3} } +\NewDocumentCommand \IfExerciseTopicSetT {m+m} + { \xsim_if_topic_value:nT {#1} {#2} } +\NewDocumentCommand \IfExerciseTopicSetF {m+m} + { \xsim_if_topic_value:nF {#1} {#2} } + % ---------------------------------------------------------------------------- \NewDocumentCommand \ForEachPrintedExerciseByType {+m} @@ -544,12 +565,12 @@ } % ---------------------------------------------------------------------------- - + \NewDocumentCommand \gradingtable {O{}} { \group_begin: - \keys_set:nn {xsim/grading-table} { template = default , type = , #1} - \xsim_setup_template:nnV {table} \l_xism_grading_table_template_tl + \keys_set:nn {xsim/grading-table} {#1} + \xsim_setup_template:nVn {table} \l_xism_grading_table_template_tl { \providecommand* \ExerciseTableCode {} \providecommand* \ExerciseTableType [1] {} |