summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xsim
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-09-30 21:52:46 +0000
committerKarl Berry <karl@freefriends.org>2019-09-30 21:52:46 +0000
commit6c0fed440c27ba0d6856feeb1000320320cf8a96 (patch)
tree8cc4e971b5e90015e329853a2213f557eb5c9cd8 /Master/texmf-dist/tex/latex/xsim
parentea9225ae59ad8eedf594cd44fcb2e37414995215 (diff)
xsim (30sep19)
git-svn-id: svn://tug.org/texlive/trunk@52232 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.cls108
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex86
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex7
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex12
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex8
-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.tex8
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex10
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.sty6
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex2
-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.tex17
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsimverb.sty2
22 files changed, 183 insertions, 117 deletions
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
index 1db5337a58b..00bab726360 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--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/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
index e5eff8b7287..39a4306f593 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--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/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex
index 32fee6e1bd3..df767976b60 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--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/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex
index 97a37e2f711..18af3f404de 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--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/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex
index 62c963d6313..b7d348e0d51 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--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/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex
index 1c27ad960a9..02fb1444f71 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--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/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
index ac12cb51539..49976aa53f2 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--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/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex
index a269fe2c5d0..98cebe3eb34 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--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/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex
index ab8662ad71b..98847ae129c 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--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/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex
index 4c25e99b456..e8a75cf85b5 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--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/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex
index 32beb122083..b8798e9c47b 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--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/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex
index 9337dc2073a..3d94ca4b616 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--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/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
index 06558868cb0..1222a61b2e9 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--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/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
index e8bddf2a10d..7cdaa0a9484 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--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/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
index b8ac06aca03..fda5152a50c 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--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/Master/texmf-dist/tex/latex/xsim/xsim.sty b/Master/texmf-dist/tex/latex/xsim/xsim.sty
index 93747223979..8570e7a186f 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--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/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
index e8a43b0992d..304316eed0e 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.style.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--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/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex
index 4fac1762f8e..52ac1b519ad 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--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/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex
index 9ed767f4a7a..2f167a23a47 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--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/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex
index e398575c40e..978413f6e6c 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--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/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
index 83124c5ff26..a04ab8fed43 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--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/Master/texmf-dist/tex/latex/xsim/xsimverb.sty b/Master/texmf-dist/tex/latex/xsim/xsimverb.sty
index 8064d0d06d7..40464152770 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--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