summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xsim
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-14 21:31:31 +0000
committerKarl Berry <karl@freefriends.org>2018-02-14 21:31:31 +0000
commit5dc958d03508be1e48423296a0b88d973ccd2d74 (patch)
tree28875c7c9fae9bb3c9c88120eddc1fb6663feb76 /Master/texmf-dist/tex/latex/xsim
parentc9f9bf7a01281c0b591c5df6bac04399630bdf48 (diff)
xsim (14feb18)
git-svn-id: svn://tug.org/texlive/trunk@46634 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xsim')
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim-manual.cls61
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex18
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex9
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex37
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex7
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex12
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.sty8
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex (renamed from Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex)2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex19
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsimverb.sty29
22 files changed, 177 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
index 23fb8db3f24..1db5337a58b 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
+++ b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
@@ -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
@@ -126,6 +126,12 @@
IfExerciseTypeGoalsSumF ,
IfExerciseTypeGoalsSumT ,
IfExerciseTypeGoalsSumTF ,
+ IfExerciseTagSetF ,
+ IfExerciseTagSetT ,
+ IfExerciseTagSetTF ,
+ IfExerciseTopicSetF ,
+ IfExerciseTopicSetT ,
+ IfExerciseTopicSetTF ,
IfInsideSolutionF ,
IfInsideSolutionT ,
IfInsideSolutionTF ,
@@ -143,6 +149,7 @@
printsolutions ,
printsolutionstype ,
PropertyValue ,
+ ProvideExerciseTagging ,
SaveExerciseProperty ,
SetExerciseParameter ,
SetExerciseParameters ,
@@ -678,6 +685,38 @@
% ----------------------------------------------------------------------------
+\ExplSyntaxOn
+\cs_set:Npn \__xsim_get_texsx_number:w texsx- #1 \q_stop: {#1}
+\cs_set:Npn \__xsim_get_texwelt_number:w texwelt- #1 \q_stop: {#1}
+\cs_set:Npn \__xsim_get_golatex_number:w golatex- #1 \q_stop: {#1}
+
+\newcommand* \xsim@example@links [1] {
+ \href { \xsim@example@texfile@path {#1} } { \color{white} [\TeX] } ~
+ \href { \xsim@example@pdffile@path {#1} } { \color{white} [PDF] }
+ \tl_if_in:nnT {#1} {texsx}
+ {
+ \tl_set:Nx \l_tmpa_tl { \__xsim_get_texsx_number:w #1 \q_stop: }
+ \space \href
+ { https \c_colon_str //tex.stackexchange.com/q/ \l_tmpa_tl / }
+ { \color {white} [forum] }
+ }
+ \tl_if_in:nnT {#1} {texwelt}
+ {
+ \tl_set:Nx \l_tmpa_tl { \__xsim_get_texwelt_number:w #1 \q_stop: }
+ \space \href
+ { http \c_colon_str //texwelt.de/wissen/fragen/ \l_tmpa_tl / }
+ { \color {white} [forum] }
+ }
+ \tl_if_in:nnT {#1} {golatex}
+ {
+ \tl_set:Nx \l_tmpa_tl { \__xsim_get_golatex_number:w #1 \q_stop: }
+ \space \href
+ { http \c_colon_str //golatex.de/viewtopic,p, \l_tmpa_tl .html }
+ { \color {white} [forum] }
+ }
+}
+\ExplSyntaxOff
+
\newcounter{examplefile}
\newcounter{examplefiles}
\newcommand*\xsim@add@example[1]{%
@@ -695,8 +734,7 @@
sidebyside gap=0pt,
lower separated=false,
title=Example~\theexamplefile\ \enquote{\texttt{##1}}
- \href{\xsim@example@texfile@path{##1}}{\color{white}[\TeX]}
- \href{\xsim@example@pdffile@path{##1}}{\color{white}[PDF]}%
+ \xsim@example@links{##1}%
]
\bookmark[level=2,dest=examplefile.\arabic{examplefile}]{Example~\theexamplefile\ (##1)}%
\lstinputlisting[style=cnltx,lastline=10]{\xsim@example@texfile@path{##1}}
@@ -739,10 +777,11 @@
\xsim@add@example{texsx-369803}
\xsim@add@example{texsx-370642}
\xsim@add@example{texsx-391530}
+\xsim@add@example{texsx-395273}
\xsim@add@example{texwelt-6698}
\xsim@add@example{texwelt-15093}
-\xsim@add@example{golatex-16824}
-\xsim@add@example{golatex-18844}
+\xsim@add@example{golatex-80640}
+\xsim@add@example{golatex-91339}
% ----------------------------------------------------------------------------
@@ -771,11 +810,13 @@
\xsim@add@layout{runin}[\renewcommand*\theexercise{\arabic{exercise}.}]
\xsim@add@layout{margin}[\renewcommand*\theexercise{\arabic{exercise}.}]
-\xsim@add@version{0.8} {2017-05-18}
-\xsim@add@version{0.8a} {2017-05-19}
-\xsim@add@version{0.8b} {2017-05-23}
-\xsim@add@version{0.9} {2017-06-20}
-\xsim@add@version{0.10} {2017-09-19}
+\xsim@add@version{0.8} {2017-05-18}
+\xsim@add@version{0.8a} {2017-05-19}
+\xsim@add@version{0.8b} {2017-05-23}
+\xsim@add@version{0.9} {2017-06-20}
+\xsim@add@version{0.10} {2017-09-19}
+\xsim@add@version{0.10a} {2017-10-04}
+\xsim@add@version{0.11} {2018-02-12}
% ----------------------------------------------------------------------------
\endinput
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
index 2959a910915..e5eff8b7287 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.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
@@ -54,6 +54,13 @@
% list for recording values that need to be written to the aux file and
% updated at begin document
+\str_new:N \l__xsim_split_aux_lists_str
+\keys_define:nn {xsim}
+ {
+ split-aux-lists .code:n = \str_set:Nn \l__xsim_split_aux_lists_str {#1} ,
+ split-aux-lists .initial:n = ||
+ }
+
% define list:
% #1: name
\cs_new_protected:Npn \xsim_new_list:n #1
@@ -67,7 +74,8 @@
\prop_gclear:c {g__xsim_list_#1_prop}
\tl_if_blank:nF {##1}
{
- \seq_gset_split:cnx {g__xsim_list_#1_seq} {|}
+ \seq_gset_split:cVx {g__xsim_list_#1_seq}
+ \l__xsim_split_aux_lists_str
{ \tl_to_str:n {##1} }
\seq_map_inline:cn {g__xsim_list_#1_seq}
{ \prop_gput:cnn {g__xsim_list_#1_prop} {####1} {} }
@@ -99,10 +107,6 @@
\seq_gput_right:cV {g__xsim_list_#1_seq} \l__xsim_tmpa_str
}
\cs_generate_variant:Nn \xsim_add_to_list:nn {nx}
-\cs_generate_variant:Nn \seq_if_in:NnT {cV}
-\cs_generate_variant:Nn \seq_gremove_all:Nn {cV}
-\cs_generate_variant:Nn \seq_gput_right:Nn {cV}
-\cs_generate_variant:Nn \seq_gset_split:Nnn {cnx}
% #1: name
% #2: entry
@@ -154,7 +158,7 @@
\bool_if:NF \l__xsim_empty_lists_bool
{
\xsim_add_cs_to_aux:nn {#1}
- { { \seq_use:cn {g__xsim_list_#1_seq} {|} } }
+ { { \seq_use:cV {g__xsim_list_#1_seq} \l__xsim_split_aux_lists_str } }
}
}
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex
index abec4de0501..32fee6e1bd3 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.base.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
@@ -32,9 +32,13 @@
% ----------------------------------------------------------------------------
% variants of kernel functions:
\cs_generate_variant:Nn \seq_set_split:Nnn {Nnx,NV}
-\cs_generate_variant:Nn \seq_gset_split:Nnn {c}
+\cs_generate_variant:Nn \seq_gset_split:Nnn {c,cVx,cnx}
+\cs_generate_variant:Nn \seq_use:Nn {cV}
\cs_generate_variant:Nn \seq_count:N {c}
\cs_generate_variant:Nn \seq_if_empty:NT {c}
+\cs_generate_variant:Nn \seq_if_in:NnT {cV}
+\cs_generate_variant:Nn \seq_gremove_all:Nn {cV}
+\cs_generate_variant:Nn \seq_gput_right:Nn {cV}
\cs_generate_variant:Nn \prop_put:Nnn {cxx}
\cs_generate_variant:Nn \prop_gput:Nnn {Nx,Nnx,cxx}
\cs_generate_variant:Nn \prop_item:Nn {c}
@@ -54,6 +58,7 @@
\cs_generate_variant:Nn \iow_now:Nn {NV}
\cs_generate_variant:Nn \str_if_eq:nnT {x}
\cs_generate_variant:Nn \iow_now:Nn {NV}
+\cs_generate_variant:Nn \prg_new_protected_conditional:Npnn {c}
% ----------------------------------------------------------------------------
% temporary variables:
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex
index 55b1db7cf45..97a37e2f711 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.blanks.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex
index e3945e86a43..62c963d6313 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.collections.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
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 824da2241ea..1c27ad960a9 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.definitions.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
index aa89ce5ee2c..ac12cb51539 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.environments.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex
index 185544564f5..a269fe2c5d0 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.exercises.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex
index d537754fa72..ab8662ad71b 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.goals.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex
index 141aaa3da3f..4c25e99b456 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.grades.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
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] {}
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex
index a2913f4ad80..9337dc2073a 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.modules.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
@@ -198,14 +198,15 @@
% style files
\NewDocumentCommand \xsimstyle {smO{}}
{
- \__xsim_module:nn {#2} {#3}
+ \__xsim_module:nn {style.#2} {#3}
\IfBooleanT {#1} { \ExplSyntaxOn }
}
\cs_new_protected:Npn \xsim_style_options:nn #1#2
{ \keys_define:nn {xsim/#1} {#2} }
-\NewDocumentCommand \loadxsimstyle {m} { \xsim_load_modules:n {#1} }
+\NewDocumentCommand \loadxsimstyle {m}
+ { \clist_map_inline:nn {#1} { \xsim_load_module:n {style.##1} } }
% --------------------------------------------------------------------------
\file_input_stop:
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
index a932faf4472..06558868cb0 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.properties.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
index 0730d04d454..e8bddf2a10d 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.random.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
@@ -27,6 +27,16 @@
% ----------------------------------------------------------------------------
\XSIMmodule{random}{randomly select exercises from collections}
+\msg_new:nnn {xsim} {random-numbers-unavailable}
+ {
+ You~ are~ compiling~ your~ document~ using ~XeLaTeX.~ Please~ be~ aware~
+ that~ random~ selection~ of~ exercises~ is~ unavailable~ in~ XeLaTeX.~ If~
+ you~ use~ this~ feature~ you~ can~ safely~ ignore~ this~ message.
+ }
+
+\sys_if_engine_xetex:T
+ { \msg_warning:nn {xsim} {random-numbers-unavailable} }
+
\xsim_load_modules:n {collections}
\tl_new:N \l_xsim_random_collection_tl
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
index 6855f635968..b8ac06aca03 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.solutions.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.sty b/Master/texmf-dist/tex/latex/xsim/xsim.sty
index b7ce1cf4b3f..93747223979 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.sty
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.sty
@@ -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
@@ -29,9 +29,9 @@
\ExplSyntaxOn
-\tl_const:Nn \c_xsim_date_tl {2017/09/19}
+\tl_const:Nn \c_xsim_date_tl {2018/02/12}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
-\tl_const:Nn \c_xsim_version_minor_number_tl {10}
+\tl_const:Nn \c_xsim_version_minor_number_tl {11}
\tl_const:Nn \c_xsim_version_subrelease_tl {}
\tl_const:Nx \c_xsim_version_number_tl
{
@@ -54,7 +54,7 @@
% --------------------------------------------------------------------------
% options, information
-
+
\bool_new:N \g_xsim_final_bool
\bool_new:N \g_xsim_verbose_bool
\bool_new:N \g_xsim_clear_aux_bool
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
index 3b94b6cc518..e8a43b0992d 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex
index 57e0dfd38bf..4fac1762f8e 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.tags.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
@@ -40,6 +40,9 @@
}
\cs_generate_variant:Nn \xsim_set_seq_from_clist:Nn {c,Nx}
+\msg_new:nnn {xsim} {tag-exists}
+ { The~ tag~ type~ `#1'~ already~ exists.~ I~ am~ doing~ nothing. }
+
% #1: name
\cs_new_protected:Npn \xsim_new_tag_type:n #1
{
@@ -56,6 +59,12 @@
#1 .code:n =
\xsim_set_seq_from_clist:cn {l__xsim_chosen_tags_#1_seq} {##1}
}
+ \prg_new_protected_conditional:cpnn {xsim_if_#1_value:n} ##1 {T,F,TF}
+ {
+ \seq_if_in:cnTF {l__xsim_chosen_tags_#1_seq} {##1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
\xsim_declare_property:nnnn
{ \c_false_bool }
{ \c_false_bool }
@@ -78,6 +87,14 @@
}
% #1: tag type
+\prg_new_protected_conditional:Npnn \xsim_if_tag_type_exists:n #1 {T,F,TF}
+ {
+ \seq_if_in:NnTF \l__xsim_tag_types_seq {#1}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+
+% #1: tag type
% #2: exercise type
% #3: id
% #4: print|use
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex
index fa62e3f96c4..9ed767f4a7a 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.templates.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
@@ -133,7 +133,7 @@
% #3: setup code
\cs_new_protected:Npn \xsim_setup_template:nnn #1#2#3
{ \tl_set:cn {l__xsim_template_#1_#2_setup_tl} {#3} }
-\cs_generate_variant:Nn \xsim_setup_template:nnn {nnV}
+\cs_generate_variant:Nn \xsim_setup_template:nnn {nnV,nVn}
% #1: template type
% #2: template name
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex
index 83feaf8169d..e398575c40e 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.translations.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
index 748550657d5..83124c5ff26 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.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
diff --git a/Master/texmf-dist/tex/latex/xsim/xsimverb.sty b/Master/texmf-dist/tex/latex/xsim/xsimverb.sty
index ec5fbd14dde..8064d0d06d7 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsimverb.sty
+++ b/Master/texmf-dist/tex/latex/xsim/xsimverb.sty
@@ -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
@@ -52,6 +52,30 @@
{\c_xsimverb_version_tl}
{\c_xsimverb_info_tl}
+% options, information
+
+\bool_new:N \g_xsim_final_bool
+\bool_new:N \g_xsim_verbose_bool
+\bool_new:N \g_xsim_clear_aux_bool
+
+\keys_define:nn {xsim}
+ {
+ final .bool_gset:N = \g_xsim_final_bool ,
+ verbose .bool_gset:N = \g_xsim_verbose_bool ,
+ clear-aux .bool_gset:N = \g_xsim_clear_aux_bool
+ }
+
+\DeclareOption {final}
+ { \bool_gset_true:N \g_xsim_final_bool }
+
+\DeclareOption {verbose}
+ { \bool_gset_true:N \g_xsim_verbose_bool }
+
+\DeclareOption {clear-aux}
+ { \bool_gset_true:N \g_xsim_clear_aux_bool }
+
+\ProcessOptions \scan_stop:
+
% --------------------------------------------------------------------------
% load module mechanism:
@@ -64,3 +88,6 @@
% --------------------------------------------------------------------------
\file_input_stop:
+
+2018/01/31 - define xsim's options as dummy options to prevent possible errors
+ caused by undefined booleans