summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xsim
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-01 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2019-10-01 03:01:24 +0000
commit31d84cec65917cfc6ef446f1bf6031cff7c6dc7b (patch)
tree5288bd8601943a9038885a87d93b71b8fbc0b0dc /macros/latex/contrib/xsim
parentbbbe8128e7ae9d816a221377dbf5ff3969bb203b (diff)
CTAN sync 201910010301
Diffstat (limited to 'macros/latex/contrib/xsim')
-rw-r--r--macros/latex/contrib/xsim/README9
-rw-r--r--macros/latex/contrib/xsim/code/xsim.auxfile.code.tex2
-rw-r--r--macros/latex/contrib/xsim/code/xsim.base.code.tex4
-rw-r--r--macros/latex/contrib/xsim/code/xsim.blanks.code.tex4
-rw-r--r--macros/latex/contrib/xsim/code/xsim.collections.code.tex4
-rw-r--r--macros/latex/contrib/xsim/code/xsim.definitions.code.tex86
-rw-r--r--macros/latex/contrib/xsim/code/xsim.environments.code.tex7
-rw-r--r--macros/latex/contrib/xsim/code/xsim.exercises.code.tex12
-rw-r--r--macros/latex/contrib/xsim/code/xsim.goals.code.tex8
-rw-r--r--macros/latex/contrib/xsim/code/xsim.grades.code.tex2
-rw-r--r--macros/latex/contrib/xsim/code/xsim.interface.code.tex8
-rw-r--r--macros/latex/contrib/xsim/code/xsim.modules.code.tex10
-rw-r--r--macros/latex/contrib/xsim/code/xsim.properties.code.tex4
-rw-r--r--macros/latex/contrib/xsim/code/xsim.random.code.tex4
-rw-r--r--macros/latex/contrib/xsim/code/xsim.solutions.code.tex2
-rw-r--r--macros/latex/contrib/xsim/code/xsim.sty6
-rw-r--r--macros/latex/contrib/xsim/code/xsim.style.layouts.code.tex2
-rw-r--r--macros/latex/contrib/xsim/code/xsim.tags.code.tex4
-rw-r--r--macros/latex/contrib/xsim/code/xsim.templates.code.tex2
-rw-r--r--macros/latex/contrib/xsim/code/xsim.translations.code.tex2
-rw-r--r--macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex17
-rw-r--r--macros/latex/contrib/xsim/code/xsimverb.sty2
-rw-r--r--macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.pdfbin30541 -> 30938 bytes
-rw-r--r--macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.tex6
-rw-r--r--macros/latex/contrib/xsim/doc/xsim-manual.cls108
-rw-r--r--macros/latex/contrib/xsim/doc/xsim.history5
-rw-r--r--macros/latex/contrib/xsim/doc/xsim.ideas3
-rw-r--r--macros/latex/contrib/xsim/doc/xsim_manual.pdfbin1163299 -> 1225761 bytes
-rw-r--r--macros/latex/contrib/xsim/doc/xsim_manual.tex48
29 files changed, 229 insertions, 142 deletions
diff --git a/macros/latex/contrib/xsim/README b/macros/latex/contrib/xsim/README
index 1c1284233f..722702fd3c 100644
--- a/macros/latex/contrib/xsim/README
+++ b/macros/latex/contrib/xsim/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-XSIM 2018/02/12 v0.11
+XSIM 2019/09/30 v0.12
eXercise Sheets IMproved
@@ -8,7 +8,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2017--2018 Clemens Niederberger
+Copyright 2017--2019 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -25,6 +25,7 @@ The Current Maintainer of this work is Clemens Niederberger.
The xsim package consists of the code files:
xsim.sty
xsimverb.sty
+ xsim.auxfile.code.tex
xsim.base.code.tex
xsim.blanks.code.tex
xsim.collections.code.tex
@@ -34,11 +35,11 @@ The xsim package consists of the code files:
xsim.goals.code.tex
xsim.grades.code.tex
xsim.interface.code.tex
- xsim.layouts.code.tex
xsim.modules.code.tex
xsim.properties.code.tex
xsim.random.code.tex
xsim.solutions.code.tex
+ xsim.style.layouts.code.tex
xsim.tags.code.tex
xsim.templates.code.tex
xsim.translations.code.tex
@@ -63,8 +64,8 @@ The xsim package consists of the example files:
xsim.grade-distribution.tex, xsim.grade-distribution.pdf
xsim.hints.tex, xsim.hints.pdf
xsim.listings.tex, xsim.listings.pdf
- xsim.multiplechoice.tex, xsim.multiplechoice.pdf
xsim.listofexercises.tex, xsim.listofexercises.pdf
+ xsim.multiplechoice.tex, xsim.multiplechoice.pdf
xsim.pointsums.tex, xsim.pointsums.pdf
xsim.randomexercises.tex, xsim.randomexercises.pdf
xsim.various.tex, xsim.various.pdf
diff --git a/macros/latex/contrib/xsim/code/xsim.auxfile.code.tex b/macros/latex/contrib/xsim/code/xsim.auxfile.code.tex
index e5eff8b728..39a4306f59 100644
--- a/macros/latex/contrib/xsim/code/xsim.auxfile.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.auxfile.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/code/xsim.base.code.tex b/macros/latex/contrib/xsim/code/xsim.base.code.tex
index 32fee6e1bd..df767976b6 100644
--- a/macros/latex/contrib/xsim/code/xsim.base.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.base.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -57,6 +57,8 @@
\cs_generate_variant:Nn \tl_set_rescan:Nnn {Nnn}
\cs_generate_variant:Nn \iow_now:Nn {NV}
\cs_generate_variant:Nn \str_if_eq:nnT {x}
+\cs_generate_variant:Nn \str_if_eq:nnF {xx}
+\cs_generate_variant:Nn \str_if_eq_p:nn {e}
\cs_generate_variant:Nn \iow_now:Nn {NV}
\cs_generate_variant:Nn \prg_new_protected_conditional:Npnn {c}
diff --git a/macros/latex/contrib/xsim/code/xsim.blanks.code.tex b/macros/latex/contrib/xsim/code/xsim.blanks.code.tex
index 97a37e2f71..18af3f404d 100644
--- a/macros/latex/contrib/xsim/code/xsim.blanks.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.blanks.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -67,7 +67,7 @@
\tl_set:Nn \l__xsim_blank_linespread_tl {#1} ,
linespread .initial:n = 1 ,
line-increment .dim_set:N = \l__xsim_blank_line_increment_dim ,
- line-increment .initial:n = 1pt ,
+ line-increment .initial:n = 0.001\linewidth ,
line-minimum-length .dim_set:N = \l__xsim_blank_line_minimum_length_dim ,
line-minimum-length .initial:n = 2em
}
diff --git a/macros/latex/contrib/xsim/code/xsim.collections.code.tex b/macros/latex/contrib/xsim/code/xsim.collections.code.tex
index 62c963d631..b7d348e0d5 100644
--- a/macros/latex/contrib/xsim/code/xsim.collections.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.collections.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -353,7 +353,7 @@
{
\bool_if:nTF
{
- !\str_if_eq_x_p:nn {#1} {all~ exercises} &&
+ !\str_if_eq_p:en {#1} {all~ exercises} &&
\prop_item:Nn \g__xsim_collections_prop {#1}
}
{ \prg_return_true: }
diff --git a/macros/latex/contrib/xsim/code/xsim.definitions.code.tex b/macros/latex/contrib/xsim/code/xsim.definitions.code.tex
index 1c27ad960a..02fb1444f7 100644
--- a/macros/latex/contrib/xsim/code/xsim.definitions.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.definitions.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -34,6 +34,8 @@
\DeclareExerciseParameter*!{solution-env}
\DeclareExerciseParameter !{exercise-name}
\DeclareExerciseParameter !{solution-name}
+\DeclareExerciseParameter {exercises-name}
+\DeclareExerciseParameter {solutions-name}
\DeclareExerciseParameter !{exercise-template}
\DeclareExerciseParameter !{solution-template}
\DeclareExerciseParameter* {counter}
@@ -75,7 +77,7 @@
\DeclareExerciseTagging {tags}
\DeclareExerciseTagging {topics}
-\xsimsetup{tags/ingore-untagged=false}
+\xsimsetup{tags/ignore-untagged=false}
% ----------------------------------------------------------------------------
@@ -160,7 +162,9 @@
exercise-env = exercise ,
solution-env = solution ,
exercise-name = \XSIMtranslate {exercise} ,
+ exercises-name = \XSIMtranslate {exercises} ,
solution-name = \XSIMtranslate {solution} ,
+ solutions-name = \XSIMtranslate {solutions} ,
exercise-template = default ,
solution-template = default
}
@@ -339,6 +343,13 @@
German = \"Ubung
}
+\DeclareExerciseTranslations {exercises} {
+ Fallback = exercises ,
+ English = exercises ,
+ French = exercices ,
+ German = \"Ubungen
+}
+
\DeclareExerciseTranslations {question} {
Fallback = question ,
English = question ,
@@ -346,6 +357,13 @@
German = Aufgabe
}
+\DeclareExerciseTranslations {questions} {
+ Fallback = questions ,
+ English = questions ,
+ French = questions ,
+ German = Aufgaben
+}
+
\DeclareExerciseTranslations {solution} {
Fallback = solution ,
English = solution ,
@@ -353,6 +371,13 @@
German = L\"osung
}
+\DeclareExerciseTranslations {solutions} {
+ Fallback = solutions ,
+ English = solutions ,
+ French = solutions ,
+ German = L\"osungen
+}
+
\DeclareExerciseTranslations {point-abbr} {
Fallback = p. ,
English = p. ,
@@ -377,55 +402,66 @@
\DeclareExerciseTranslations {reached} {
Fallback = reached ,
English = reached ,
- French = atteint ,
+ French = obtenus ,
German = erreicht
}
\DeclareExerciseTranslations {total} {
Fallback = total ,
English = total ,
- French = totalement ,
+ French = total ,
German = insgesamt
}
\DeclareExerciseTranslations {default-heading} {
- Fallback = \XSIMmixedcase { \GetExerciseParameter {solution-name} s }~
- to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} s} ,
- English = \XSIMmixedcase { \GetExerciseParameter {solution-name} s }~
- to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} s} ,
- German = \XSIMmixedcase { \GetExerciseParameter {solution-name} en }~
- zu~ den~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} en}
+ Fallback = \XSIMmixedcase { \GetExerciseParameter {solutions-name} }~
+ to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ,
+ English = \XSIMmixedcase { \GetExerciseParameter {solutions-name} }~
+ to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ,
+ French = \XSIMmixedcase { \GetExerciseParameter {solutions-name} ~
+ des~ \GetExerciseParameter {exercises-name} } ,
+ German = \XSIMmixedcase { \GetExerciseParameter {solutions-name} }~
+ zu~ den~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} }
}
\DeclareExerciseTranslations {collection-heading} {
- Fallback = \XSIMmixedcase { \GetExerciseParameter {exercise-name} s } ,
- English = \XSIMmixedcase { \GetExerciseParameter {exercise-name} s } ,
- German = \XSIMmixedcase { \GetExerciseParameter {exercise-name} en }
+ Fallback = \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ,
+ English = \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ,
+ French = \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ,
+ German = \XSIMmixedcase { \GetExerciseParameter {exercises-name} }
}
\DeclareExerciseTranslations {per-section-heading} {
- Fallback = \XSIMmixedcase { \GetExerciseParameter {solution-name} s }~
- to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} s}~
+ Fallback = \XSIMmixedcase { \GetExerciseParameter {solutions-name} } ~
+ to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ~
of~ Section \nobreakspace \ExerciseSection ,
- English = \XSIMmixedcase { \GetExerciseParameter {solution-name} s }~
- to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} s}~
+ English = \XSIMmixedcase { \GetExerciseParameter {solutions-name} } ~
+ to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ~
of~ Section \nobreakspace \ExerciseSection ,
- German = \XSIMmixedcase { \GetExerciseParameter {solution-name} en }~
- zu~ den~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} en}~
+ French = \XSIMmixedcase { \GetExerciseParameter {solutions-name} ~
+ des~ \GetExerciseParameter {exercises-name} ~ de~ la~
+ section \nobreakspace \ExerciseSection } ,
+ German = \XSIMmixedcase { \GetExerciseParameter {solutions-name} } ~
+ zu~ den~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} }~
in~ Abschnitt \nobreakspace \ExerciseSection
}
\DeclareExerciseTranslations {per-chapter-heading} {
- Fallback = \XSIMmixedcase { \GetExerciseParameter {solution-name} s }~
- to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} s}~
+ Fallback = \XSIMmixedcase { \GetExerciseParameter {solutions-name} } ~
+ to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ~
of~ Chapter \nobreakspace \ExerciseChapter ,
- English = \XSIMmixedcase { \GetExerciseParameter {solution-name} s }~
- to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} s}~
+ English = \XSIMmixedcase { \GetExerciseParameter {solutions-name} } ~
+ to~ the~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ~
of~ Chapter \nobreakspace \ExerciseChapter ,
- German = \XSIMmixedcase { \GetExerciseParameter {solution-name} en }~
- zu~ den~ \XSIMmixedcase { \GetExerciseParameter {exercise-name} en}~
+ French = \XSIMmixedcase { \GetExerciseParameter {solutions-name} ~
+ des~ \GetExerciseParameter {exercises-name} ~
+ du~ chapitre \nobreakspace \ExerciseChapter } ,
+ German = \XSIMmixedcase { \GetExerciseParameter {solutions-name} } ~
+ zu~ den~ \XSIMmixedcase { \GetExerciseParameter {exercises-name} } ~
in~ Kapitel \nobreakspace \ExerciseChapter
}
% ----------------------------------------------------------------------------
\file_input_stop:
+
+2019/02/17 fixed error in German translations (issue 39)
diff --git a/macros/latex/contrib/xsim/code/xsim.environments.code.tex b/macros/latex/contrib/xsim/code/xsim.environments.code.tex
index ac12cb5153..49976aa53f 100644
--- a/macros/latex/contrib/xsim/code/xsim.environments.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.environments.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -295,8 +295,7 @@
\str_if_eq:nnT {#4} {solution}
{
\__xsim_set_file_signature:nnn {#1} {#2} {exercise}
- \tl_set_from_file:Nnn \ExerciseText {}
- {\l__xsim_file_path_and_name_tl}
+ \file_get:nnN {\l__xsim_file_path_and_name_tl} {} \ExerciseText
\tl_trim_spaces:N \ExerciseText
}
\use:x
@@ -378,3 +377,5 @@
% ----------------------------------------------------------------------------
\file_input_stop:
+
+2019/02/17 - fix issue #43
diff --git a/macros/latex/contrib/xsim/code/xsim.exercises.code.tex b/macros/latex/contrib/xsim/code/xsim.exercises.code.tex
index a269fe2c5d..98cebe3eb3 100644
--- a/macros/latex/contrib/xsim/code/xsim.exercises.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.exercises.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -317,6 +317,16 @@
\xsim_set_parameter:nnx {#1} {number}
{ number of \xsim_get_parameter:nn {#1} {exercise-env} s }
\xsim_check_mandatory_parameters:n {#1}
+ \xsim_if_parameter_set:nnF {#1} {exercises-name}
+ {
+ \xsim_set_parameters:nn {#1}
+ { exercises-name = \xsim_get_parameter:nn {#1} {exercise-name} s }
+ }
+ \xsim_if_parameter_set:nnF {#1} {solutions-name}
+ {
+ \xsim_set_parameters:nn {#1}
+ { solutions-name = \xsim_get_parameter:nn {#1} {solution-name} s }
+ }
\xsim_if_parameter_set:nnF {#1} {counter}
{
\xsim_set_parameters:nx {#1}
diff --git a/macros/latex/contrib/xsim/code/xsim.goals.code.tex b/macros/latex/contrib/xsim/code/xsim.goals.code.tex
index ab8662ad71..98847ae129 100644
--- a/macros/latex/contrib/xsim/code/xsim.goals.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.goals.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -81,9 +81,9 @@
\xsim_if_goal_exists:nT {#3}
{
\fp_gadd:cn {g__xsim_goal_#3_fp}
- { 0 \xsim_get_property:nnn {#1} {#2} {#3} }
+ { \xsim_get_property:nnn {#1} {#2} {#3} + 0 }
\fp_gadd:cn {g__xsim_#1_goal_#3_fp}
- { 0 \xsim_get_property:nnn {#1} {#2} {#3} }
+ { \xsim_get_property:nnn {#1} {#2} {#3} + 0 }
}
}
@@ -305,3 +305,5 @@
% ----------------------------------------------------------------------------
\file_input_stop:
+
+2019/01/30 bug fix (cf. https://texwelt.de/wissen/fragen/24101/)
diff --git a/macros/latex/contrib/xsim/code/xsim.grades.code.tex b/macros/latex/contrib/xsim/code/xsim.grades.code.tex
index 4c25e99b45..e8a75cf85b 100644
--- a/macros/latex/contrib/xsim/code/xsim.grades.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.grades.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/code/xsim.interface.code.tex b/macros/latex/contrib/xsim/code/xsim.interface.code.tex
index 32beb12208..b8798e9c47 100644
--- a/macros/latex/contrib/xsim/code/xsim.interface.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.interface.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -227,14 +227,14 @@
\NewDocumentCommand \DeclareExerciseParameter {st!m}
{
- \IfBooleanTF {#1}
+ \IfBooleanTF {#1} % fixed
{
- \IfBooleanTF {#2}
+ \IfBooleanTF {#2} % mandatory
{ \xsim_declare_parameter:nnn {true} {true} {#3} }
{ \xsim_declare_parameter:nnn {true} {false} {#3} }
}
{
- \IfBooleanTF {#2}
+ \IfBooleanTF {#2} % mandatory
{ \xsim_declare_parameter:nnn {false} {true} {#3} }
{ \xsim_declare_parameter:nnn {false} {false} {#3} }
}
diff --git a/macros/latex/contrib/xsim/code/xsim.modules.code.tex b/macros/latex/contrib/xsim/code/xsim.modules.code.tex
index 9337dc2073..3d94ca4b61 100644
--- a/macros/latex/contrib/xsim/code/xsim.modules.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.modules.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -66,7 +66,7 @@
\cs_new_protected:Npn \xsim_load_module:n #1
{
\tl_set:Nx \l_tmpa_tl { \tl_trim_spaces:n {#1} }
- \str_if_eq_x:nnTF { \l_tmpa_tl } {modules}
+ \str_if_eq:VnTF \l_tmpa_tl {modules}
{ \msg_error:nn {xsim} {forbidden-module} }
{ \__xsim_load_module:V \l_tmpa_tl }
}
@@ -162,12 +162,14 @@
\tl_set:Nx \l__xsim_module_date_tl {\c_xsim_date_tl}
\tl_set:Nx \l__xsim_module_version_tl {\c_xsim_version_tl}
}
-
+
+\cs_generate_variant:Nn \str_if_eq:nnF {xx}
+
\cs_new_protected:Npn \__xsim_module:nn #1#2
{
\seq_gput_right:Nn \g__xsim_loaded_modules_seq {#1}
\prop_gput:Nnn \g__xsim_loaded_modules_prop {#1} {#2}
- \str_if_eq_x:nnF
+ \str_if_eq:xxF
{\c__xsim_module_prefix_tl.#1.\c__xsim_module_extension_tl}
{\@currname.\@currext}
{
diff --git a/macros/latex/contrib/xsim/code/xsim.properties.code.tex b/macros/latex/contrib/xsim/code/xsim.properties.code.tex
index 06558868cb..1222a61b2e 100644
--- a/macros/latex/contrib/xsim/code/xsim.properties.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.properties.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -182,7 +182,7 @@
\cs_new_protected:Npn \__xsim_set_boolean_property:nnnn #1#2#3#4
{
- \str_case_x:nnTF { \str_lower_case:n {#4} }
+ \str_case_e:nnTF { \str_lower_case:n {#4} }
{
{} {}
{true} {}
diff --git a/macros/latex/contrib/xsim/code/xsim.random.code.tex b/macros/latex/contrib/xsim/code/xsim.random.code.tex
index e8bddf2a10..7cdaa0a948 100644
--- a/macros/latex/contrib/xsim/code/xsim.random.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.random.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -295,7 +295,7 @@
{
\tl_set:Nx \l__xsim_tmpa_tl
{ \xsim_get_id_for_property:nn {ID} {##1} }
- \tl_if_blank:NTF \l__xsim_tmpa_tl
+ \tl_if_blank:VTF \l__xsim_tmpa_tl
{ \seq_put_right:Nn \l__xsim_tmpa_seq {##1} }
{
\seq_put_right:Nx \l__xsim_tmpa_seq
diff --git a/macros/latex/contrib/xsim/code/xsim.solutions.code.tex b/macros/latex/contrib/xsim/code/xsim.solutions.code.tex
index b8ac06aca0..fda5152a50 100644
--- a/macros/latex/contrib/xsim/code/xsim.solutions.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.solutions.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/code/xsim.sty b/macros/latex/contrib/xsim/code/xsim.sty
index 9374722397..8570e7a186 100644
--- a/macros/latex/contrib/xsim/code/xsim.sty
+++ b/macros/latex/contrib/xsim/code/xsim.sty
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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 {2018/02/12}
+\tl_const:Nn \c_xsim_date_tl {2019/09/30}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
-\tl_const:Nn \c_xsim_version_minor_number_tl {11}
+\tl_const:Nn \c_xsim_version_minor_number_tl {12}
\tl_const:Nn \c_xsim_version_subrelease_tl {}
\tl_const:Nx \c_xsim_version_number_tl
{
diff --git a/macros/latex/contrib/xsim/code/xsim.style.layouts.code.tex b/macros/latex/contrib/xsim/code/xsim.style.layouts.code.tex
index e8a43b0992..304316eed0 100644
--- a/macros/latex/contrib/xsim/code/xsim.style.layouts.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.style.layouts.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/code/xsim.tags.code.tex b/macros/latex/contrib/xsim/code/xsim.tags.code.tex
index 4fac1762f8..52ac1b519a 100644
--- a/macros/latex/contrib/xsim/code/xsim.tags.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.tags.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -54,7 +54,7 @@
\bool_new:c {l____xsim_tagged_#1_bool}
\keys_define:nn {xsim}
{
- #1/ingore-untagged .bool_set:c = {l__xsim_ignore_untagged_#1_bool} ,
+ #1/ignore-untagged .bool_set:c = {l__xsim_ignore_untagged_#1_bool} ,
#1/ignore-untagged .initial:n = true ,
#1 .code:n =
\xsim_set_seq_from_clist:cn {l__xsim_chosen_tags_#1_seq} {##1}
diff --git a/macros/latex/contrib/xsim/code/xsim.templates.code.tex b/macros/latex/contrib/xsim/code/xsim.templates.code.tex
index 9ed767f4a7..2f167a23a4 100644
--- a/macros/latex/contrib/xsim/code/xsim.templates.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.templates.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/code/xsim.translations.code.tex b/macros/latex/contrib/xsim/code/xsim.translations.code.tex
index e398575c40..978413f6e6 100644
--- a/macros/latex/contrib/xsim/code/xsim.translations.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.translations.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex b/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex
index 83124c5ff2..a04ab8fed4 100644
--- a/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex
+++ b/macros/latex/contrib/xsim/code/xsim.verbwrite.code.tex
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -66,7 +66,7 @@
{ \xsim_if_final:F { \iow_close:N #1 } }
% #1: write stream
-% #1: contents
+% #2: contents
\cs_new_protected:Npn \__xsim_write_to_stream:Nn #1#2
{
\xsim_if_final:F
@@ -75,6 +75,9 @@
% no options are given to the surrounding environment:
\tl_set:Nn \l__xsim_tmpa_tl {#2}
\tl_remove_once:Nn \l__xsim_tmpa_tl {~}
+ % \tl_show:N \l__xsim_tmpa_tl
+ % \int_show:n { \tl_count:N \l__xsim_tmpa_tl }
+ % \tl_analysis_show:N \l__xsim_tmpa_tl
\int_zero:N \l__xsim_tmpa_int
\int_while_do:nn { \l__xsim_tmpa_int < \l_xsim_line_gobble_int }
{
@@ -147,10 +150,10 @@
\cs_set:Npx \__xsim_M:w { \exp_not:N \end {\@currenvir} } %
\char_set_active_eq:nN {13} \__xsim_M:w %
% the last line is `##1 \end{\@currenvir} ##2':
- % \tl_if_blank:nF {##1} %
- % { \__xsim_write_to_stream:Nn \l__file_contents_iow {##1} }%
- % \tl_if_blank:nF {##2} %
- % {}%
+ \tl_if_blank:nF {##1} %
+ { \__xsim_write_to_stream:Nn \l__file_contents_iow {##1} }%
+ \tl_if_blank:nF {##2} %
+ {} %
} %
^^M %
} %
@@ -204,6 +207,6 @@
\NewDocumentCommand \XSIMgobblechars {m}
{ \int_set:Nn \l_xsim_line_gobble_int {#1} }
-
+
% ----------------------------------------------------------------------------
\file_input_stop:
diff --git a/macros/latex/contrib/xsim/code/xsimverb.sty b/macros/latex/contrib/xsim/code/xsimverb.sty
index 8064d0d06d..4046415277 100644
--- a/macros/latex/contrib/xsim/code/xsimverb.sty
+++ b/macros/latex/contrib/xsim/code/xsimverb.sty
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 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/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.pdf b/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.pdf
index bbbcfbc18a..72894ac9a6 100644
--- a/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.pdf
+++ b/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.tex b/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.tex
index f753f13939..66afaf9b8a 100644
--- a/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.tex
+++ b/macros/latex/contrib/xsim/doc/examples/xsim.code-and-output.tex
@@ -10,7 +10,7 @@
}
\makeatletter
-\NewDocumentEnvironment{example}{o}
+\NewDocumentEnvironment{example}{!o}
{%
\XSIMgobblechars{2}%
\XSIMsetfilebegin{\@percentchar\space file `\jobname.tmp'}%
@@ -25,7 +25,7 @@
\input{\jobname.tmp}
}
-\NewDocumentEnvironment{code}{o}
+\NewDocumentEnvironment{code}{!o}
{%
\XSIMgobblechars{2}%
\IfNoValueTF{#1}
@@ -46,7 +46,7 @@
\bigskip
-\begin{code}
+\begin{code}[]
blubber \LaTeX
\end{code}
diff --git a/macros/latex/contrib/xsim/doc/xsim-manual.cls b/macros/latex/contrib/xsim/doc/xsim-manual.cls
index 1db5337a58..00bab72636 100644
--- a/macros/latex/contrib/xsim/doc/xsim-manual.cls
+++ b/macros/latex/contrib/xsim/doc/xsim-manual.cls
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -29,7 +29,7 @@
% please ignore the contents of this file -- it is not a good example for
% coding...
%
-\ProvidesClass{xsim-manual}[2017/09/18]
+\ProvidesClass{xsim-manual}[2019/09/27]
\LoadClass[load-preamble,add-index]{cnltx-doc}
\RequirePackage{imakeidx}
@@ -286,6 +286,7 @@
style=cnltx,
sortlocale=en_US,
indexing=cite]{biblatex}
+\RequirePackage{csquotes}
\addbibresource{cnltx.bib}
\RequirePackage[biblatex]{embrac}
@@ -452,20 +453,6 @@
tables.}
}
-\ExplSyntaxOn
-\NewAcroCommand \Acs
- {
- \acro_first_upper:
- \acro_short:n {#1}
- }
-\NewAcroCommand \Acsp
- {
- \acro_first_upper:
- \acro_plural:
- \acro_short:n {#1}
- }
-\ExplSyntaxOff
-
\newcommand*\environ{\@ifstar\environ@star\environ@nostar}
\newcommand*\environ@star[1]{\beginenv*\Marg{\env*{#1}}}
\newcommand*\environ@nostar[1]{\beginenv*\Marg{\env{#1}}}
@@ -494,23 +481,36 @@
#1%
}
-\RenewDocumentEnvironment{sourcecode}{O{}}
+\newcommand*\xsimman@readoptions[1]{%
+ \catcode`\^^M=13
+ \xsimman@read@options{#1}%
+}
+
+\begingroup
+\catcode`\^^M=13
+\gdef\xsimman@read@options#1#2^^M{%
+ \ifblank{#2}{}{\xsimman@read@options@#2}%
+ #1%
+ \XSIMfilewritestart*{\jobname.tmp}%
+}%
+\endgroup
+\def\xsimman@read@options@[#1]{\pgfqkeys{/cnltx}{#1}}
+
+\RenewDocumentEnvironment{sourcecode}{}
{%
- \pgfqkeys{/cnltx}{#1}%
- \setlength\cnltx@sidebysidewidth
- {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
- \XSIMexpandcode{%
- \noexpand\lstset{
- style=cnltx,
- \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
- {linewidth=\cnltx@sidebysidewidth,}{}%
- \expandonce\cnltx@local@listings@options
+ \xsimman@readoptions{%
+ \setlength\cnltx@sidebysidewidth
+ {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
+ \XSIMexpandcode{%
+ \noexpand\lstset{
+ style=cnltx,
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {linewidth=\cnltx@sidebysidewidth,}{}%
+ \expandonce\cnltx@local@listings@options
+ }%
}%
+ \XSIMgobblechars{2}%
}%
- \XSIMgobblechars{2}%
- \XSIMifblankTF{#1}
- {\XSIMfilewritestart*{\jobname.tmp}}
- {\XSIMfilewritestart{\jobname.tmp}}%
}
{%
\XSIMfilewritestop
@@ -519,23 +519,21 @@
\endcnltxcode
}
-\RenewDocumentEnvironment{example} {O{}}
+\RenewDocumentEnvironment{example}{}
{%
- \pgfqkeys{/cnltx}{#1}%
- \setlength\cnltx@sidebysidewidth
- {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
- \XSIMexpandcode{%
- \noexpand\lstset{
- style=cnltx,
- \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
- {linewidth=\cnltx@sidebysidewidth,}{}%
- \expandonce\cnltx@local@listings@options
+ \xsimman@readoptions{%
+ \setlength\cnltx@sidebysidewidth
+ {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
+ \XSIMexpandcode{%
+ \noexpand\lstset{
+ style=cnltx,
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {linewidth=\cnltx@sidebysidewidth,}{}%
+ \expandonce\cnltx@local@listings@options
+ }%
}%
+ \XSIMgobblechars{2}%
}%
- \XSIMgobblechars{2}%
- \XSIMifblankTF{#1}
- {\XSIMfilewritestart*{\jobname.tmp}}
- {\XSIMfilewritestart{\jobname.tmp}}%
}
{%
\XSIMfilewritestop
@@ -730,18 +728,29 @@
\begin{cnltxcode}[
step and label={examplefile}{example:##1} ,
sidebyside align=top seam,sidebyside,
- righthand width=\linewidth/4,
- sidebyside gap=0pt,
+ righthand width=.3\linewidth,
+ sidebyside gap=1em,
lower separated=false,
+ bottom=1mm,
+ % rightlower=0pt,
+ % halign lower=flush right,
+ % clip lower,
title=Example~\theexamplefile\ \enquote{\texttt{##1}}
\xsim@example@links{##1}%
]
\bookmark[level=2,dest=examplefile.\arabic{examplefile}]{Example~\theexamplefile\ (##1)}%
- \lstinputlisting[style=cnltx,lastline=10]{\xsim@example@texfile@path{##1}}
+ \lstinputlisting[style=cnltx,firstline=7,lastline=16]{\xsim@example@texfile@path{##1}}
\tcblower
\fbox{%
- \href{\xsim@example@pdffile@path{##1}}{%
- \includegraphics[width=.8\linewidth]{\xsim@example@pdffile@path{##1}}}}%
+ \href
+ {\xsim@example@pdffile@path{##1}}
+ {%
+ \includegraphics[
+ pagebox=cropbox,
+ viewport=4.5cm 18cm 8.7cm 23.3cm,
+ clip]{\xsim@example@pdffile@path{##1}}%
+ }%
+ }%
\end{cnltxcode}
}%
\dolistloop\xsim@examplefiles
@@ -817,6 +826,7 @@
\xsim@add@version{0.10} {2017-09-19}
\xsim@add@version{0.10a} {2017-10-04}
\xsim@add@version{0.11} {2018-02-12}
+\xsim@add@version{0.12} {2019-09-26}
% ----------------------------------------------------------------------------
\endinput
diff --git a/macros/latex/contrib/xsim/doc/xsim.history b/macros/latex/contrib/xsim/doc/xsim.history
index b0a2fe526b..a22d42ad03 100644
--- a/macros/latex/contrib/xsim/doc/xsim.history
+++ b/macros/latex/contrib/xsim/doc/xsim.history
@@ -7,7 +7,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2017--2018 Clemens Niederberger
+Copyright 2017--2019 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -111,3 +111,6 @@ HISTORY:
- introduce a \xsim_if_<tagging>_value:nTF for each tag
kind
- \ProvideExerciseTagging
+ v0.12 2019/09/30 - add parameter versions for the plural forms of exercise
+ and solution names
+ - bug fixes (issues 37, 39, 43, 47)
diff --git a/macros/latex/contrib/xsim/doc/xsim.ideas b/macros/latex/contrib/xsim/doc/xsim.ideas
index 29fa058fde..7a7810f84d 100644
--- a/macros/latex/contrib/xsim/doc/xsim.ideas
+++ b/macros/latex/contrib/xsim/doc/xsim.ideas
@@ -7,7 +7,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
-Copyright 2017--2018 Clemens Niederberger
+Copyright 2017--2019 Clemens Niederberger
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -29,3 +29,4 @@ IDEAS:
- provide a switch: either write the environments to an external file
or save it to an auxiliary file ? (not really sure about this one --
probably not)
+- some kind of `subexercise' mechanism
diff --git a/macros/latex/contrib/xsim/doc/xsim_manual.pdf b/macros/latex/contrib/xsim/doc/xsim_manual.pdf
index 2cc93eb00b..bfd2c31641 100644
--- a/macros/latex/contrib/xsim/doc/xsim_manual.pdf
+++ b/macros/latex/contrib/xsim/doc/xsim_manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/xsim/doc/xsim_manual.tex b/macros/latex/contrib/xsim/doc/xsim_manual.tex
index 53c620c1bb..afc17fd68a 100644
--- a/macros/latex/contrib/xsim/doc/xsim_manual.tex
+++ b/macros/latex/contrib/xsim/doc/xsim_manual.tex
@@ -13,7 +13,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
-% Copyright 2017--2018 Clemens Niederberger
+% Copyright 2017--2019 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -218,7 +218,7 @@ As can be seen in the example a solution is not printed with the default
setup. This can be changed using the following option.
\begin{options}
\keybool{print}\Module{solution}\Default{false}
- Set if solutions are printed or or not.
+ Set if solutions are printed or not.
\end{options}
The option (belonging to the module \module*{solution}) can either be set
@@ -238,13 +238,13 @@ or with the setup command for all following solutions:
There is an completely analoguous option for the \env{exercise} environment:
\begin{options}
\keybool{print}\Module{exercise}\Default{true}
- Set if exercises are printed or or not.
+ Set if exercises are printed or not.
\end{options}
More details on those two environments can be found in
section~\vref{sec:using-printing}.
\section{How the Exercise Environments Work}\label{sec:how-exerc-envir}
-Both the exercise and the solution enviroments write the contents of their
+Both the exercise and the solution environments write the contents of their
bodies verbatim to external files following a certain naming structure:
\begin{itemize}
\item
@@ -252,7 +252,7 @@ bodies verbatim to external files following a certain naming structure:
\end{itemize}
The name starts with the name of the job (which is the name of the document
itself) followed by type and id of the corresponding exercise and then
-followed by the environment type. For example both enviroments from the first
+followed by the environment type. For example both environments from the first
example have been written to files named
\begin{itemize}
\item \verbcode+xsim_manual-exercise-1-exercise-body.tex+ and
@@ -287,9 +287,12 @@ order to deal with this somehow \xsim\ offers the following option:
auxiliary files.
\end{options}
-Another thing to keep in mind: the environment in many ways works the same way
-as the \env{filecontents} environment. \emph{This also means that you
- \emph{cannot} have comments on the first line of the environments:}
+\begin{bewareofthedog}
+ Another thing to keep in mind: the environment in many ways works the same
+ way as the \env{filecontents} environment. \emph{This also means that you
+ \emph{cannot} have comments or \cs*{label}s or anything else on the first
+ line of the environments!}
+\end{bewareofthedog}
\begin{sourcecode}
\begin{exercise}[points=2] % this comment will cause trouble
Lorem ipsum
@@ -357,7 +360,9 @@ Declaring a new exercise type will also define a new command:
exercise-env = exercise ,
solution-env = solution ,
exercise-name = \XSIMtranslate{exercise} ,
+ exercises-name = \XSIMtranslate{exercises} ,
solution-name = \XSIMtranslate{solution} ,
+ solutions-name = \XSIMtranslate{solutions} ,
exercise-template = default ,
solution-template = default
}
@@ -375,9 +380,17 @@ must) be set. Here is the complete list:
\paraval{exercise-name}{exercise name}
The name of the exercises of type \meta{type} -- used for typesetting.
\emph{This parameter is mandatory.}
+ \paraval{exercises-name}{exercises name}
+ The\sinceversion{0.12} plural name of the exercises of type \meta{type} --
+ used for typesetting. If this is not set explicitly an \code{s} is
+ appended to the singular name.
\paraval{solution-name}{solution name}
The name of the solutions of type \meta{type} -- used for typesetting.
\emph{This parameter is mandatory.}
+ \paraval{solutions-name}{solutions name}
+ The\sinceversion{0.12} plural name of the solutions of type \meta{type} --
+ used for typesetting. If this is not set explicitly an \code{s} is
+ appended to the singular name.
\paraval{exercise-template}{exercise template}
The template used for typesetting the exercises of type \meta{type}.
\emph{This parameter is mandatory.} See
@@ -446,7 +459,7 @@ Exercise like the \env{exercise} environment and possibly others defined with
Holds the user id of an exercise if defined. Otherwise it is equal to
\property{id}.
\propval{counter}{text}
- Holds the counter value represenation of an exercise (\ie, what you
+ Holds the counter value representation of an exercise (\ie, what you
usually know as \cs*{the\meta{counter}}). \emph{Cannot be set by the
user}.
\propval{counter-value}{integer}
@@ -477,19 +490,19 @@ Exercise like the \env{exercise} environment and possibly others defined with
\propval{topics}{csv list of topics}
Holds the list of topics the exercise should be associated with.
\propval{page}{text}
- Holds the page counter value represenation of an exercise (\ie, what you
+ Holds the page counter value representation of an exercise (\ie, what you
usually know as \cs*{thepage}).
\propval{page-value}{integer}
Holds the page counter value of an exercise (\ie, what you usually know as
\cs*{arabic}\Marg{page}).
\propval{section}{text}
- Holds the section counter value represenation of an exercise (\ie, what
+ Holds the section counter value representation of an exercise (\ie, what
you usually know as \cs*{thesection}).
\propval{section-value}{integer}
Holds the section counter value of an exercise (\ie, what you usually know
as \cs*{arabic}\Marg{section}).
\propval{chapter}{text}
- Holds the chapter counter value represenation of an exercise (\ie, what
+ Holds the chapter counter value representation of an exercise (\ie, what
you usually know as \cs*{thechapter}). \emph{Only if a command
\cs*{chapter} \emph{and} a counter \code{chapter} exist.}
\propval{chapter-value}{integer}
@@ -631,7 +644,7 @@ available (after a compilation) throughout the document.
respectively. The starred version prints nothing. Defined in terms of
\cs{AddtoExerciseGoal} and \cs{AddtoExerciseGoalPrint}.
\command{points}[\marg{value}]
- Print \meta{value}followed by an appropriate translation of the words
+ Print \meta{value} followed by an appropriate translation of the words
\enquote{point} or \enquote{points}, respectively. Defined in terms of
\cs{ExerciseGoalValuePrint}.
\command{printbonus}[\marg{type}]
@@ -709,7 +722,7 @@ following code:
\begin{sourcecode}
\DeclareExerciseTagging{tags}
\DeclareExerciseTagging{topics}
- \xsimsetup{tags/ingore-untagged=false}
+ \xsimsetup{tags/ignore-untagged=false}
\end{sourcecode}
This means that these options are available:
\begin{options}
@@ -1536,7 +1549,7 @@ Table templates are used by \cs{gradingtable}. Those are the templates set
with the option \option{template} of module \module{grading-table}
The predefined templates are \enquote{\code{default}} and
-\enquote{\code{default}}, see sections~\vref{sec:table-templ-default}
+\enquote{\code{default*}}, see sections~\vref{sec:table-templ-default}
and~\vref{sec:table-templ-default*}.
\subsection{Examples}\label{sec:template-examples}
@@ -1938,7 +1951,7 @@ Those are the options for customization:
\keyval{linespread}{decimal number}\Module{blank}\Default{\code{1}}
Set the linespread for the blank lines. This only has an effect if
\cs{blank} is used at the begin of a paragraph.
- \keyval{line-increment}{dim}\Module{blank}\Default{\code{1pt}}
+ \keyval{line-increment}{dim}\Module{blank}\Default{\code{0.001\cs*{linewidth}}}
The blank line is built in multiples of this value. If the value is too
large you may end up with uneven lines. If the value is too small you may
end up with a non-ending compilation. Experiment with values to find the
@@ -2281,6 +2294,9 @@ package work or how different kinds of problems can be solved or how different
kinds of layouts can be achieved as well as how to solve concrete problems
that have come up in different \LaTeX\ forums.
+Besides showing excerpts of the code and the resulting pdf the examples below
+also link to both the \code{tex} source the resulting pdf.
+
\listexamplefiles
\printbibliography