summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/xsim/README2
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim.history2
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim_manual.pdfbin1229199 -> 1229505 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim_manual.tex85
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim-manual.cls25
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex52
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.sty26
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex14
8 files changed, 125 insertions, 81 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/README b/Master/texmf-dist/doc/latex/xsim/README
index da372c24491..68012b839a4 100644
--- a/Master/texmf-dist/doc/latex/xsim/README
+++ b/Master/texmf-dist/doc/latex/xsim/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-XSIM 2019/10/19 v0.14a
+XSIM 2019/11/02 v0.15
eXercise Sheets IMproved
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.history b/Master/texmf-dist/doc/latex/xsim/xsim.history
index efeac6f1817..c9e96232203 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim.history
+++ b/Master/texmf-dist/doc/latex/xsim/xsim.history
@@ -129,3 +129,5 @@ HISTORY:
- new example `texwelt-23968' (long and short solutions)
v0.14a 2019/10/19 - fix \xsim_if_exercise_exist:nnTF to obey the `no-files'
option
+ v0.15 2019/11/02 - use own auxiliary file per default and add option
+ `use-aux'
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
index 161f44a9a1f..fc6659b04fc 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
+++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
index 33ec88e4a7d..7296f6124d8 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
+++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
@@ -121,9 +121,9 @@ meaning in this manual.
environment body files.
\opt{clear-aux}
If used every time the total number of exercise changes \xsim\ will write
- \emph{less} information to the auxfile on the next run and only if the
- number of exercises stays stable between compilations the needed
- information will be written to the auxfile. \emph{This needs more
+ \emph{less} information to the auxiliary file on the next run and only if
+ the number of exercises stays stable between compilations the needed
+ information will be written to the auxiliary file. \emph{This needs more
compilations until everything stabilizes but should reduce the
probability of possibly faulty exercises after changes to the document.}
The \option{final} option automatically disables this option. See also
@@ -134,6 +134,10 @@ meaning in this manual.
``clean'' but will also prevent using verbatim material in exercises and
solutions and will possibly slow processing further down. \emph{This
option is considered experimental. Feedback is very welcome.}
+ \opt{use-aux}
+ \sinceversion{0.15}With this option enabled \xsim\ will use the regular
+ auxiliary file \cs*{jobname}\code{.aux} instead of its own auxiliary file
+ \cs*{jobname}\code{.xsim}.
\end{options}
Those options are used the usual way as package option
@@ -145,24 +149,28 @@ or as global option
\documentclass[verbose]{article}
\end{sourcecode}
or via the setup\changedversion{0.13} command as options belonging to the
-\module{package}:
+\module{package}, see also section~\vref{sec:setting-options}:
+\begin{sourcecode}
+ \xsimsetup{package/verbose}
+\end{sourcecode}
+
+\subsection{Setting Options}\label{sec:setting-options}
+Apart from the package options already described in
+section~\vref{sec:package-options} \xsim\ has further options. All those
+options are set using the following command:
\begin{commands}
\command{xsimsetup}[\marg{options}]
Set up \xsim's package options and all other options described at
other places in the manual.
\end{commands}
-
-\subsection{Setting Options}\label{sec:setting-options}
-Apart from the package options already described in
-section~\vref{sec:package-options} \xsim\ has further options. Those can be
-\enquote{toplevel} options or options belonging to a module.
+Options can be \enquote{toplevel} options or options belonging to a module:
\begin{options}
\keyval*{toplevel}{value}
A toplevel option.
\keyval*{sublevel}{value}\Module*{module}
A sublevel option belonging to the module \module*{module}
\end{options}
-Both kinds of options are set with \cs{xsimsetup}:
+Both kinds of options are set with the setup command:
\begin{sourcecode}
\xsimsetup{
toplevel = {value} ,
@@ -197,7 +205,6 @@ also means two additional commands exist:
no \meta{true} argument.
\end{commands}
-
\section{Exercises and Solutions}
The two predefined environments for exercises and solutions are the following
@@ -291,7 +298,7 @@ order to deal with this somehow \xsim\ offers the following option:
document uses \keyis{path}{exercises}.
\keyval{file-extension}{string}\Default{\code{tex}}
\sinceversion{0.10}This option let's you choose the extension of the
- auxiliary files.
+ external files.
\end{options}
\begin{bewareofthedog}
@@ -312,35 +319,22 @@ material inside the exercises and solutions then you can use the following
package option:
\begin{options}
\opt{no-files}
- This option prevents \xsim\ from writing the exercises and solutions to
- external files. This will keep your working folder ``clean'' but will
- also prevent using verbatim material in exercises and solutions and will
- possibly slow processing further down. \emph{This option is considered
- experimental. Feedback is very welcome.}
+ This package option prevents \xsim\ from writing the exercises and
+ solutions to external files. This will keep your working folder ``clean''
+ but will also prevent using verbatim material in exercises and solutions
+ and will possibly slow processing further down. \emph{This option is
+ considered experimental. Feedback is very welcome.}
\end{options}
\begin{bewareofthedog}
- \xsim\ writes a lot of stuff to the auxfile for re-using information on
- subsequent compilations. If you add exercises, change properties \etc\ it
- might happen that wrong information is staying in the auxfile and is wrongly
- used by \xsim. In such cases deleting the auxfile and doing a few fresh
- compilations may resolve your problems.
-
- Sometimes the \emph{existence of exercise or solution files from earlier
- compilations} may lead to wrong lists of exercises or solutions. In such
- cases it can be useful to delete all those files and doing a fresh
- compilation. It may be helpful to use a subfolder for those exernal files
- which will make deleting them a little bit easier. (Don't forget to both
- create the subfolder and set \option{path} accordingly then.)
-
- Using the \option{clear-aux} option might help to reduce erroneous exercises.
+ \xsimauxfileinfo
\end{bewareofthedog}
\begin{bewareofthedog}
- A lot of the lines \xsim\ writes to the auxfile and reads in a subsequent
- run look like this:
+ A lot of the lines \xsim\ writes to the auxiliary file and reads in a
+ subsequent run look like this:
\begin{sourcecode}
- \XSIM {points}{exercise-2=={4}|exercise-10=={2.5}|problem-11=={5}}
+ \XSIM{points}{exercise-2=={4}|exercise-10=={2.5}|problem-11=={5}}
\end{sourcecode}
As you can see different entries of the various properties of exercises are
separated with a \code{|}. This means that you cannot use this symbol
@@ -350,7 +344,7 @@ package option:
\begin{options}
\keyval{split-aux-lists}{string}\Default{\code{|}}
Set\sinceversion{0.11} the string that is used to separate the property
- entries in the auxfile.
+ entries in the auxiliary file.
\end{options}
\section{New Exercise Types}\label{sec:new-exercise-types}
@@ -2101,25 +2095,12 @@ keep your eyes open.
\subsection{\dots Resolve Getting Repeatedly Wrong Exercise Properties or
Wrong Exercise Lists?}\label{sec:resolve-getting}
-\xsim\ writes a lot of stuff to the auxfile for re-using information on
-subsequent compilations. If you add exercises, change properties \etc\ it
-might happen that wrong information is staying in the auxfile and is wrongly
-used by \xsim. In such cases deleting the auxfile and doing a few fresh
-compilations may resolve your problems.
-
-Sometimes the \emph{existence of exercise or solution files from earlier
- compilations} may lead to wrong lists of exercises or solutions. In such
-cases it can be useful to delete all those files and doing a fresh
-compilation. It may be helpful to use a subfolder for those exernal files
-which will make deleting them a little bit easier. (Don't forget to both
-create the subfolder and set \option{path} accordingly then.)
-
-Using the \option{clear-aux} option might help to reduce erroneous exercises.
+\xsimauxfileinfo
\subsection{\dots Resolve Strange Errors After Updating?}
-\xsim\ writes a lot of stuff to the auxfile. An update may well change how
-this is done so deleting the auxfile and doing a few fresh compilations may
-resolve your problems.
+\xsim\ writes a lot of stuff to the auxiliary file. An update may well change
+how this is done so deleting the auxiliary file and doing a few fresh
+compilations may resolve your problems.
\subsection{\code{! TeX capacity exceeded, sorry [text input levels=15].}
Why?}
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
index a36d869869f..7e8fec1b670 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
+++ b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
@@ -464,9 +464,9 @@
tables.}
}
-\newcommand*\environ{\@ifstar\environ@star\environ@nostar}
-\newcommand*\environ@star[1]{\beginenv*\Marg{\env*{#1}}}
-\newcommand*\environ@nostar[1]{\beginenv*\Marg{\env{#1}}}
+\providecommand*\environ{\@ifstar\environ@star\environ@nostar}
+\providecommand*\environ@star[1]{\beginenv*\Marg{\env*{#1}}}
+\providecommand*\environ@nostar[1]{\beginenv*\Marg{\env{#1}}}
\RequirePackage{tcolorbox}
\tcbuselibrary{skins,breakable}
@@ -857,6 +857,25 @@
\xsim@add@version{0.12} {2019-09-26}
\xsim@add@version{0.13} {2019-10-06}
\xsim@add@version{0.14} {2019-10-13}
+\xsim@add@version{0.15} {2019-11-02}
% ----------------------------------------------------------------------------
+\newrobustcmd*\xsimauxfileinfo{%
+ \xsim\ writes a lot of stuff to an auxiliary file called
+ \cs*{jobname}\code{.xsim} (or the common \cs*{jobname}\code{.aux} if you use
+ option \option{use-aux}) for re-using information on subsequent
+ compilations. If you add exercises, change properties \etc\ it might happen
+ that wrong information is staying in the auxiliary file and is wrongly used
+ by \xsim. In such cases deleting the auxiliary file and doing a few fresh
+ compilations may resolve your problems.
+
+ Sometimes the \emph{existence of exercise or solution files from earlier
+ compilations} may lead to wrong lists of exercises or solutions. In such
+ cases it can be useful to delete all those files and doing a fresh
+ compilation. It may be helpful to use a subfolder for those exernal files
+ which will make deleting them a little bit easier. (Don't forget to both
+ create the subfolder and set \option{path} accordingly then.)
+
+ Using the \option{clear-aux} option might help to reduce erroneous exercises.%
+}
\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 39a4306f593..80186946168 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
@@ -25,31 +25,67 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% ----------------------------------------------------------------------------
-\XSIMmodule{auxfile}{writing stuff to the aux file}
+\XSIMmodule{auxfile}{writing stuff to an auxiliary file}
+
+\prg_new_conditional:Npnn \xsim_if_use_aux: {p,T,F,TF}
+ {
+ \bool_if:NTF \g_xsim_use_aux_bool
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
\cs_new_protected:Npn \xsim_write_to_aux:n #1
- { \iow_now:Nn \@auxout {#1} }
+ {
+ \legacy_if:nT {@filesw}
+ {
+ \xsim_if_use_aux:TF
+ { \iow_now:Nn \@auxout {#1} }
+ { \iow_now:Nn \l__xsim_aux_file_iow {#1} }
+ }
+ }
\cs_generate_variant:Nn \xsim_write_to_aux:n {x}
% --------------------------------------------------------------------------
\cs_new_protected:Npn \XSIM #1 { \use:c {XSIMaux#1} }
+\cs_new_protected:Npn \xsim_new_aux_cs:cpn #1
+ { \cs_new_protected:cpn {XSIMaux#1} }
+
+\cs_new_protected:Npn \xsim_add_cs_to_aux:nn #1#2
+ {
+ \xsim_verbose:n { Writing~ command~ \XSIM {#1}~ to~ aux~ file }
+ \xsim_write_to_aux:x { \token_to_str:N \XSIM {#1} #2 }
+ }
+
\AtBeginDocument
{
- \xsim_write_to_aux:x
+ \iow_now:Nx \@auxout
{ \token_to_str:N \providecommand \token_to_str:N \XSIM [1] {} }
}
-\cs_new_protected:Npn \xsim_new_aux_cs:cpn #1
- { \cs_new_protected:cpn {XSIMaux#1} }
+% ----------------------------------------------------------------------------
-\cs_new_protected:Npn \xsim_add_cs_to_aux:nn #1#2
+\xsim_if_use_aux:F
{
- \xsim_verbose:n { Writing~ command~ \XSIM {#1}~ to~ aux~ file }
- \xsim_write_to_aux:x { \XSIM {#1} #2 }
+ \iow_new:N \l__xsim_aux_file_iow
+ \AtBeginDocument
+ { \iow_open:Nn \l__xsim_aux_file_iow { \c_sys_jobname_str .xsim } }
}
+\cs_new_protected:Npn \xsim_close_aux:
+ {
+ \xsim_if_use_aux:F
+ {
+ \iow_close:N \l__xsim_aux_file_iow
+ \legacy_if:nT {@filesw}
+ { \iow_now:Nx \@auxout { \token_to_str:N \XSIM {readaux} } }
+ }
+ }
+
+\xsim_new_aux_cs:cpn {readaux}
+ { \file_input:n { \c_sys_jobname_str .xsim } }
+
% ----------------------------------------------------------------------------
% list for recording values that need to be written to the aux file and
% updated at begin document
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.sty b/Master/texmf-dist/tex/latex/xsim/xsim.sty
index a11fe99adaa..a56fa8ecf54 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.sty
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.sty
@@ -29,10 +29,10 @@
\ExplSyntaxOn
-\tl_const:Nn \c_xsim_date_tl {2019/10/19}
+\tl_const:Nn \c_xsim_date_tl {2019/11/02}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
-\tl_const:Nn \c_xsim_version_minor_number_tl {14}
-\tl_const:Nn \c_xsim_version_subrelease_tl {a}
+\tl_const:Nn \c_xsim_version_minor_number_tl {15}
+\tl_const:Nn \c_xsim_version_subrelease_tl {}
\tl_const:Nx \c_xsim_version_number_tl
{
\c_xsim_version_major_number_tl .
@@ -58,7 +58,9 @@
\bool_new:N \g_xsim_final_bool
\bool_new:N \g_xsim_verbose_bool
\bool_new:N \g_xsim_clear_aux_bool
-\bool_new:N \l__xsim_write_to_file_bool
+\bool_new:N \g__xsim_write_to_file_bool
+\bool_new:N \g_xsim_use_aux_bool
+\bool_new:N \g__xsim_rerun_bool
\keys_define:nn {xsim/package}
{
@@ -66,7 +68,9 @@
verbose .bool_gset:N = \g_xsim_verbose_bool ,
clear-aux .bool_gset:N = \g_xsim_clear_aux_bool ,
no-files .bool_gset_inverse:N = \g__xsim_write_to_file_bool ,
- no-files .initial:n = false
+ no-files .initial:n = false ,
+ use-aux .bool_gset:N = \g_xsim_use_aux_bool ,
+ use-aux .initial:n = false
}
\ProcessKeysPackageOptions {xsim/package}
@@ -87,12 +91,10 @@
synchronized.
}
-\msg_new:nnn {xsim} {verbose} { #1 ~(\msg_line_context:) }
+\msg_new:nnn {xsim} {verbose} { #1 ~( \msg_line_context: ) }
% --------------------------------------------------------------------------
-\bool_new:N \g__xsim_rerun_bool
-
\cs_new_protected:Npn \xsim_do_rerun:
{ \xsim_if_rerun:T { \msg_warning:nn {xsim} {rerun} } }
@@ -105,6 +107,10 @@
% --------------------------------------------------------------------------
\xsim_load_modules:n {definitions}
-\AtEndDocument { \xsim_do_rerun: }
-
+\AtEndDocument
+ {
+ \xsim_do_rerun:
+ \xsim_close_aux:
+ }
+
\file_input_stop:
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 4738dc77868..bc9b2ce0967 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
@@ -29,7 +29,7 @@
\xsim_load_modules:n {base}
-\iow_new:N \l__file_contents_iow
+\iow_new:N \l__xsim_file_contents_iow
\tl_new:N \l_xsim_file_begin_tl
\tl_new:N \l_xsim_file_end_tl
\int_new:N \l_xsim_line_gobble_int
@@ -129,12 +129,12 @@
\xsim_if_final:TF %
{ \xsim_verbose:x { Not~ (re-)writing~ file~ `#1'. } } %
{ \xsim_verbose:x { (Re-)writing~ file~ `#1'. } } %
- \__xsim_open_stream:Nn \l__file_contents_iow {#1} %
+ \__xsim_open_stream:Nn \l__xsim_file_contents_iow {#1} %
\tl_if_blank:VF \l_xsim_file_begin_tl %
{ %
\xsim_if_final:F %
{ %
- \iow_now:Nx \l__file_contents_iow %
+ \iow_now:Nx \l__xsim_file_contents_iow %
{ \l_xsim_file_begin_tl } %
} %
} %
@@ -150,13 +150,13 @@
} %
{ %
\tl_if_blank:nTF {##3} %
- { \__xsim_write_to_stream:Nn \l__file_contents_iow {##1} } %
+ { \__xsim_write_to_stream:Nn \l__xsim_file_contents_iow {##1} } %
{ %
\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} }%
+ { \__xsim_write_to_stream:Nn \l__xsim_file_contents_iow {##1} }%
\tl_if_blank:nF {##2} %
{} %
} %
@@ -184,11 +184,11 @@
{
\xsim_if_final:F
{
- \iow_now:Nx \l__file_contents_iow
+ \iow_now:Nx \l__xsim_file_contents_iow
{ \l_xsim_file_end_tl }
}
}
- \__xsim_close_stream:N \l__file_contents_iow
+ \__xsim_close_stream:N \l__xsim_file_contents_iow
\group_end:
}