summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/xsim/README2
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim.history4
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim.ideas1
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim_manual.pdfbin1231179 -> 1233169 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim_manual.tex167
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim-manual.cls21
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex32
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex10
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex15
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex13
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.sty4
-rw-r--r--Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex31
13 files changed, 187 insertions, 115 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/README b/Master/texmf-dist/doc/latex/xsim/README
index 43d9ae35361..d8f72533c50 100644
--- a/Master/texmf-dist/doc/latex/xsim/README
+++ b/Master/texmf-dist/doc/latex/xsim/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-XSIM 2020/01/21 v0.17
+XSIM 2020/02/23 v0.18
XSIMVERB 2019/12/29 v0.1a
eXercise Sheets IMproved
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.history b/Master/texmf-dist/doc/latex/xsim/xsim.history
index 7cb4ab4849f..20415de1bff 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim.history
+++ b/Master/texmf-dist/doc/latex/xsim/xsim.history
@@ -144,3 +144,7 @@ HISTORY:
- fix issue #27
- implement issue #2
- don't allow package options to be set with \xsimsetup
+ v0.18 2020/02/23 - fix issue #56
+ - change \printexercise and \printsolution to accept a
+ clist of either ids or IDs (or mixed)
+ - new templates in the `layouts' style
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.ideas b/Master/texmf-dist/doc/latex/xsim/xsim.ideas
index 6ae5cd9a6a4..b23ebec899f 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim.ideas
+++ b/Master/texmf-dist/doc/latex/xsim/xsim.ideas
@@ -26,3 +26,4 @@ IDEAS:
- a document class `xsim-exam' for creating exams
- a mechanism for providing variants of an exam
+
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
index 9014b1c3689..03d1892dacb 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 e3328631df4..e301758b606 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
+++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
@@ -817,7 +817,7 @@ depending on different settings:
\end{itemize}
\begin{example}
- \begin{exercise}[print=false]
+ \begin{exercise}[print=false,ID=invisible]
This exercise will not be printed but the exercise counter will be
incremented nonetheless. Its solution will be printed in the list of
solutions.
@@ -912,15 +912,16 @@ the environments' names are the module names for the options (here using the
If you know type and \property{id} of an exercise you can (re-)insert every
existing exercise, \ie, every exercise whose external file exists.
\begin{commands}
- \command{printexercise}[\marg{type}\marg{id}]
- Inserts the exercise of type \meta{type} with the \property{id}
- \meta{id}.
- \command{xprintexercise}[\marg{type}\marg{id}]
- \sinceversion{0.16}The same as \cs{printexercise} but expands \meta{type}
- and \meta{id} before it uses them.
+ \command{printexercise}[\marg{type}\marg{csv of ids}]
+ \changedversion{0.17a}Inserts the exercise or exercises of type
+ \meta{type} with the \property{id}s or \property{ID}s given in \meta{csv
+ of ids}.
+ \command{xprintexercise}[\marg{type}\marg{csv of ids}]
+ \sincechanged{0.16}{0.17a}The same as \cs{printexercise} but expands
+ \meta{type} and the items of \meta{csv of ids} before it uses them.
\end{commands}
\begin{example}
- \printexercise{exercise}{5}
+ \printexercise{exercise}{invisible}
\end{example}
\section{Collecting Exercises}\label{sec:collecting-exercises}
@@ -1290,14 +1291,17 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate
information on style files\index{style file}).
\item[\code{margin}] A layout rather similar to the one by package
\pkg{exsheets}, see section~\ref{sec:margin-template}. Available through
- the style file \code{layouts} (see section~\vref{sec:style-files} for more
- information on style files\index{style file}).
- \item[\code{minimal}] A\sinceversion{0.13a} minimalistic layout, see
- section~\ref{sec:minimal-template}. Available through the style file
- \code{layouts} (see section~\vref{sec:style-files} for more information on
- style files\index{style file}).
+ the style file \code{layouts}.
+ \item[\code{minimal}] A\sinceversion{0.13} minimalistic layout, see
+ section~\ref{sec:minimal-template}. As the others inspired by an
+ \pkg{exsheets} layout. Available through the style file \code{layouts}.
+ \item[\code{inline}] A\sinceversion{0.18} minimalistic layout, the same as
+ \code{minimal} but doesn't add \cs*{par} at the beginning and end.
+ Available through the style file \code{layouts}.
+ \item[\code{centered}] A\sinceversion{0.18} layout with a centered heading.
+ Available through the style file \code{layouts}.
\end{description}
-
+
\collectexercises{layouts}
\begin{exercise}[subtitle=The Subtitle,points=2.5,ID=showlayout]
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
@@ -1544,11 +1548,11 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate
\item \code{\#6}: the \property{bonus-points} property of the exercise
\end{itemize}
\command{XSIMprint}[\Marg{exercise|solution}\marg{type}\marg{id}]
- \sinceversion{0.16}Inserts the either the exercise or the solution of type
- \meta{type} with the \property{id} \meta{id}.
+ \sincechanged{0.16}{0.17a}Inserts the either the exercise or the solution
+ of type \meta{type} with the \property{id} or \property{ID} \meta{id}.
\command{XSIMxprint}[\Marg{exercise|solution}\marg{type}\marg{id}]
- \sinceversion{0.16}The same as \cs{XSIMprint} but expands \meta{type} and
- \meta{id} before it uses them.
+ \sincechanged{0.16}{0.17a}The same as \cs{XSIMprint} but expands
+ \meta{type} and \meta{id} before it uses them.
\expandable\command{XSIMtranslate}[\marg{keyword}]
Delivers the translation of \meta{keyword} according to the current
document language (in the meaning of a \pkg{babel}~\cite{pkg:babel} or
@@ -1627,6 +1631,67 @@ The predefined templates are \enquote{\code{default}} and
\enquote{\code{default*}}, see sections~\vref{sec:table-templ-default}
and~\vref{sec:table-templ-default*}.
+\subsection{Create and Use \xsim\ Style Files}\label{sec:style-files}
+\index{style file|(}
+
+\xsim\changedversion{0.11} offers you the possibility to create own
+\emph{style files}. Let's say you want to have a style called
+\code{math-exam}. Then you need to save all necessary definitions in a file
+called:
+\begin{center}
+ \code{xsim.style.math-exam.code.tex}
+\end{center}
+The first command in the file should be \cs{xsimstyle}\Marg{math-exam}. This
+file can now be loaded into your document using
+\cs{loadxsimstyle}\Marg{math-exam} or by using
+\cs{xsimsetup}\Marg{load-style=math-exam}:
+\begin{sourcecode}
+ \documentclass[DIV=18,parskip=half]{scrartcl}
+ \usepackage[T1]{fontenc}
+ \usepackage[utf8]{inputenc}
+
+ \usepackage[clear-aux]{xsim}
+ \loadxsimstyle{math-exam}
+
+ \title{Math Exam \#3}
+ \date{2017-03-28}
+\end{sourcecode}
+
+In this style file stuff like template and property definitions should
+happen. This is more or less a convenient way to
+\begin{itemize}
+ \item keep the preamble \enquote{clean} and
+ \item define re-usable styles without the need of copying the document
+ preamble to another document.
+\end{itemize}
+A style file is like a package or class file, \ie, \code{@} has category
+code~11 (letter).
+
+The formal description of the commands:
+\begin{commands}
+ \command{xsimstyle}[\sarg\marg{style name}]
+ The\changedversion{0.11} first command in a \xsim\ style file called
+ \code{xsim.style.\meta{style name}.code.tex} which defines the \xsim\
+ style \meta{style name}. The starred version activates expl3
+ syntax\footnote{Those users who want this will know what it means. If you
+ don't know what it means you will not need it.}.
+ \command{loadxsimstyle}[\marg{csv list of style names}]
+ Load one or more styles into the document.
+\end{commands}
+\begin{options}
+ \keyval{load-style}{csv list of style names}
+ Another\sinceversion{0.14} interface for \cs{loadxsimstyle}\marg{csv list
+ of style names}.
+\end{options}
+
+\begin{bewareofthedog}
+ At the moment this mechanism offers no advantages over creating a custom
+ package or simply \cs*{input}ing a file. Future versions might provide
+ additional features.
+\end{bewareofthedog}
+
+\index{style file|)}
+
\subsection{Examples}\label{sec:template-examples}
The repository of this package\footnote{GitHub:
@@ -1793,6 +1858,7 @@ This shows the implementation of the \code{minimal} template:
\begin{sourcecode}
\DeclareExerciseEnvironmentTemplate{minimal}
{%
+ \par
\textbf{\GetExerciseProperty{counter}}%
\IfInsideSolutionF{%
\GetExercisePropertyT{points}{%
@@ -1803,7 +1869,7 @@ This shows the implementation of the \code{minimal} template:
}%
}%
}
- {}
+ {\par}
\end{sourcecode}
\subsubsection{The Headings Templates}\label{sec:headings-templates}
@@ -2184,67 +2250,6 @@ The usage is now as follows:
\end{exercise}
\end{example}
-\subsection{\dots Create and Use \xsim\ Style Files?}\label{sec:style-files}
-\index{style file|(}
-
-\xsim\changedversion{0.11} offers you the possibility to create own
-\emph{style files}. Let's say you want to have a style called
-\code{math-exam}. Then you need to save all necessary definitions in a file
-called:
-\begin{center}
- \code{xsim.style.math-exam.code.tex}
-\end{center}
-The first command in the file should be \cs{xsimstyle}\Marg{math-exam}. This
-file can now be loaded into your document using
-\cs{loadxsimstyle}\Marg{math-exam} or by using
-\cs{xsimsetup}\Marg{load-style=math-exam}:
-\begin{sourcecode}
- \documentclass[DIV=18,parskip=half]{scrartcl}
- \usepackage[T1]{fontenc}
- \usepackage[utf8]{inputenc}
-
- \usepackage[clear-aux]{xsim}
- \loadxsimstyle{math-exam}
-
- \title{Math Exam \#3}
- \date{2017-03-28}
-\end{sourcecode}
-
-In this style file stuff like template and property definitions should
-happen. This is more or less a convenient way to
-\begin{itemize}
- \item keep the preamble \enquote{clean} and
- \item define re-usable styles without the need of copying the document
- preamble to another document.
-\end{itemize}
-A style file is like a package or class file, \ie, \code{@} has category
-code~11 (letter).
-
-The formal description of the commands:
-\begin{commands}
- \command{xsimstyle}[\sarg\marg{style name}]
- The\changedversion{0.11} first command in a \xsim\ style file called
- \code{xsim.style.\meta{style name}.code.tex} which defines the \xsim\
- style \meta{style name}. The starred version activates expl3
- syntax\footnote{Those users who want this will know what it means. If you
- don't know what it means you will not need it.}.
- \command{loadxsimstyle}[\marg{csv list of style names}]
- Load one or more styles into the document.
-\end{commands}
-\begin{options}
- \keyval{load-style}{csv list of style names}
- Another\sinceversion{0.14} interface for \cs{loadxsimstyle}\marg{csv list
- of style names}.
-\end{options}
-
-\begin{bewareofthedog}
- At the moment this mechanism offers no advantages over creating a custom
- package or simply \cs*{input}ing a file. Future versions might provide
- additional features.
-\end{bewareofthedog}
-
-\index{style file|)}
-
\subsection{\dots Print All Solutions Grouped by Section?}
Here is an idea how to get a list of all solutions grouped by the section the
corresponding exercises are appearing in.
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
index 3fa56cc833b..1171fe9dd24 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
+++ b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
@@ -29,7 +29,7 @@
% please ignore the contents of this file -- it is not a good example for
% coding...
%
-\ProvidesClass{xsim-manual}[2019/12/29]
+\ProvidesClass{xsim-manual}[2020/02/23]
\LoadClass[load-preamble,add-index]{cnltx-doc}
\RequirePackage{imakeidx}
@@ -103,6 +103,7 @@
ForEachUsedExerciseByID ,
GetExerciseAliasProperty ,
GetExerciseHeadingF ,
+ GetExerciseIdForProperty ,
GetExerciseName ,
GetExerciseParameter ,
GetExerciseProperty ,
@@ -248,6 +249,7 @@
\RequirePackage[en-US]{datetime2}
+\DTMlangsetup[en-US]{abbr}
\newrobustcmd*\xsim@add@version[2]{\csdef{xsimversion#1}{\DTMdate{#2}}}
\renewrobustcmd*\sinceversion[1]{%
\cnltx@version@note{\GetTranslation{cnltx-introduced}~#1 (\csuse{xsimversion#1})}%
@@ -796,23 +798,24 @@
\newcommand*\listlayouts{%
\def\do##1{%
- \begin{cnltxcode}[{title=Layout \enquote{\texttt{##1}}}]
+ \begin{cnltxcode}[{title=Layout \enquote{\texttt{##1}}\csuse{xsim@layout@description@##1}}]
\ifcsdef{xsim@layout@extra@##1}
{\csuse{xsim@layout@extra@##1}}
{}%
\xsimsetup{exercise/template={##1}}
\let\marginpar\marginnote
- \XSIMexpandcode{%
- \printexercise{exercise}{\GetExerciseIdForProperty{ID}{showlayout}}
- }%
+ \printexercise{exercise}{showlayout}%
\end{cnltxcode}
}%
\dolistloop\xsim@layouts
}
-\NewDocumentCommand\xsim@add@layout{mo}{%
+\NewDocumentCommand\xsim@add@layout{moo}{%
\listadd\xsim@layouts{#1}%
\IfNoValueF{#2}{\csdef{xsim@layout@extra@#1}{#2}}%
+ \IfNoValueTF{#3}
+ {\csdef{xsim@layout@description@#1}{}}
+ {\csdef{xsim@layout@description@#1}{ \footnotesize(#3)}}%
}
% ----------------------------------------------------------------------------
@@ -862,7 +865,10 @@
\xsim@add@layout{default}
\xsim@add@layout{runin}[\renewcommand*\theexercise{\arabic{exercise}.}]
\xsim@add@layout{margin}[\renewcommand*\theexercise{\arabic{exercise}.}]
-\xsim@add@layout{minimal}[\renewcommand*\theexercise{\arabic{exercise}.}]
+\xsim@add@layout{inline}[\renewcommand*\theexercise{\arabic{exercise}.}]
+\xsim@add@layout{minimal}[\renewcommand*\theexercise{\arabic{exercise}.}][Like
+\enquote{\texttt{inline}} but as own paragraph.]
+\xsim@add@layout{centered}[\renewcommand*\theexercise{\arabic{exercise}.}]
% ----------------------------------------------------------------------------
% versions:
@@ -892,6 +898,7 @@
\xsim@add@version{0.16} {2019-11-10}
\xsim@add@version{0.16a} {2020-01-16}
\xsim@add@version{0.17} {2020-02-21}
+\xsim@add@version{0.18} {2020-02-23}
% ----------------------------------------------------------------------------
\newrobustcmd*\xsimauxfileinfo{%
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 37a3df68e99..ce4b281ba02 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
@@ -427,7 +427,7 @@
}
}
}
-\cs_generate_variant:Nn \xsim_insert:nnnn {nV,VV,nnnV,xx}
+\cs_generate_variant:Nn \xsim_insert:nnnn {nV,VV,nnnV,xx,ne}
% #1: type
% #2: id
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 0eb8535e3f7..b0ca92a1c47 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex
@@ -513,10 +513,10 @@
{ \xsim_foreach_exercise_id_type:nn {print} {#1} }
\NewDocumentCommand \ForEachUsedExerciseByType {+m}
- { \xsim_foreach_exercise_type_id:nn {use} {#1} }
+ { \xsim_foreach_exercise_type_id:nn {used} {#1} }
\NewDocumentCommand \ForEachUsedExerciseByID {+m}
- { \xsim_foreach_exercise_id_type:nn {use} {#1} }
+ { \xsim_foreach_exercise_id_type:nn {used} {#1} }
% ----------------------------------------------------------------------------
@@ -553,10 +553,10 @@
{
\group_begin:
\keys_set:nn {xsim/random} {#1}
- \xsim_print_random_list:VnV
+ \xsim_print_random_list:VnN
\l_xsim_random_collection_tl
{#2}
- \l_xsim_random_exclude_list_tl
+ \l_xsim_random_exclude_list_clist
\group_end:
}
@@ -610,22 +610,34 @@
% ----------------------------------------------------------------------------
\NewDocumentCommand \XSIMprint {mO{}mm}
- { \xsim_insert:nnnn {#3} {#4} {#2} {#1} }
+ { \xsim_insert:nenn {#3} { \xsim_normalize_id:n {#4} } {#2} {#1} }
\NewDocumentCommand \XSIMxprint {mO{}mm}
- { \xsim_insert:xxnn {#3} {#4} {#2} {#1} }
+ { \xsim_insert:xxnn {#3} { \xsim_normalize_id:e {#4} } {#2} {#1} }
\NewDocumentCommand \printexercise {O{}mm}
- { \xsim_insert:nnnn {#2} {#3} {#1} {exercise} }
+ {
+ \clist_map_inline:nn {#3}
+ { \xsim_insert:nenn {#2} { \xsim_normalize_id:n {##1} } {#1} {exercise} }
+ }
\NewDocumentCommand \xprintexercise {O{}mm}
- { \xsim_insert:xxnn {#2} {#3} {#1} {exercise} }
+ {
+ \clist_map_inline:nn {#3}
+ { \xsim_insert:xxnn {#2} { \xsim_normalize_id:e {##1} } {#1} {exercise} }
+ }
\NewDocumentCommand \printsolution {O{}mm}
- { \xsim_insert:nnnn {#2} {#3} {#1} {solution} }
+ {
+ \clist_map_inline:nn {#3}
+ { \xsim_insert:nenn {#2} { \xsim_normalize_id:n {##1} } {#1} {solution} }
+ }
\NewDocumentCommand \xprintsolution {O{}mm}
- { \xsim_insert:xxnn {#2} {#3} {#1} {solution} }
+ {
+ \clist_map_inline:nn {#3}
+ { \xsim_insert:xxnn {#2} { \xsim_normalize_id:e {##1} } {#1} {solution} }
+ }
% ----------------------------------------------------------------------------
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 825b8f25176..0bbc972f219 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
@@ -447,6 +447,16 @@
{ \prop_item:cn {g__xsim_property_#1_type_prop} {#2} }
\cs_generate_variant:Nn \xsim_get_type_for_property:nn {nV}
+% #1: id or ID
+\cs_new:Npn \xsim_normalize_id:n #1
+ {
+ \tl_if_blank:eTF
+ { \xsim_get_id_for_property:nn {ID} {#1} }
+ {#1}
+ { \xsim_get_id_for_property:nn {ID} {#1} }
+ }
+\cs_generate_variant:Nn \xsim_normalize_id:n {e}
+
\cs_new:Npn \__xsim_get_property_tmp:n #1 {}
\cs_generate_variant:Nn \__xsim_get_property_tmp:n {V}
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 2087adf9de3..422963792f3 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
@@ -40,7 +40,6 @@
\xsim_load_modules:n {collections}
\tl_new:N \l_xsim_random_collection_tl
-\tl_new:N \l_xsim_random_exclude_list_tl
\tl_new:N \l__xsim_print_random_choice_tl
\tl_const:Nn \c__xsim_print_random_both_tl {both}
\tl_const:Nn \c__xsim_print_random_exercise_tl {exercise}
@@ -49,6 +48,7 @@
\seq_new:N \l__xsim_allowed_exercise_ids_seq
\int_new:N \g__xsim_random_list_id_int
\bool_new:N \l__xsim_sort_random_bool
+\clist_new:N \l_xsim_random_exclude_list_clist
% #1: random list id
% #2: csv list of integers
@@ -106,8 +106,8 @@
% #1: collection
% #2: number of items
-% #3: csv list of excluded ids
-\cs_new_protected:Npn \xsim_print_random_list:nnn #1#2#3
+% #3: clist variable of excluded ids
+\cs_new_protected:Npn \xsim_print_random_list:nnN #1#2#3
{
\xsim_if_collection_exist:nTF {#1}
{
@@ -122,7 +122,7 @@
{ \xsim_get_type_for_property:nn {id} {##1} }
\xsim_if_in_collection:nVnT {#1} \l__xsim_tmpa_tl {##1}
{
- \clist_if_in:nnF {#3} {##1}
+ \clist_if_in:NnF #3 {##1}
{ \seq_put_right:Nn \l__xsim_allowed_exercise_ids_seq {##1} }
}
}
@@ -157,7 +157,7 @@
}
{ \msg_error:nnn {xsim} {unknown-collection} {#1} }
}
-\cs_generate_variant:Nn \xsim_print_random_list:nnn {VnV}
+\cs_generate_variant:Nn \xsim_print_random_list:nnN {V}
% #1: random list id
% #2: max number to choose from
@@ -299,8 +299,9 @@
}
}
\seq_remove_duplicates:N \l__xsim_tmpa_seq
- \tl_set:Nx \l_xsim_random_exclude_list_tl
- { \seq_use:Nn \l__xsim_tmpa_seq {,} }
+ \clist_set_from_seq:NN
+ \l_xsim_random_exclude_list_clist
+ \l__xsim_tmpa_seq
}
% use this in the exclude list:
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 902f377864f..2666d1aa864 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
@@ -104,7 +104,8 @@
% ----------------------------------------------------------------------------
-% #1: conditional base function (three n args)% #2: name
+% #1: conditional base function (three n args)
+% #2: name
% #3: code (refer to type and id with `#1' and `#2'), #3 refers to the boolean
% properties use/print
\cs_new_protected:Npn \xsim_new_solutions_condition:Nnn #1#2#3
@@ -270,7 +271,7 @@
{ \bool_set_true:N \l__xsim_tmpa_bool }
}
{
- \xsim_if_solutions_do:nnn {#4} {use}
+ \xsim_if_solutions_do:nnn {#4} {used}
{ \bool_set_true:N \l__xsim_tmpa_bool }
}
\tl_set:Nn \ExerciseType {#4}
@@ -289,7 +290,7 @@
{ \__xsim_print_entry:nn {#4} {##2} }
}
{
- \xsim_if_solutions_do:nnn {#4} {use}
+ \xsim_if_solutions_do:nnn {#4} {used}
{ \__xsim_print_entry:nn {#4} {##2} }
}
#3
@@ -341,9 +342,9 @@
}
}
{
- \xsim_foreach_exercise_id_type:nn {use}
+ \xsim_foreach_exercise_id_type:nn {used}
{
- \xsim_if_this_solution_do:nnnn {##1} {##2} {use}
+ \xsim_if_this_solution_do:nnnn {##1} {##2} {used}
{ \xsim_insert:nnnn {##1} {##2} {} {solution} }
}
}
@@ -406,3 +407,5 @@
% ----------------------------------------------------------------------------
\file_input_stop:
+
+2020/02/23 - resolve bug #56
diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.sty b/Master/texmf-dist/tex/latex/xsim/xsim.sty
index 0939f4796a2..8cd0f237960 100644
--- a/Master/texmf-dist/tex/latex/xsim/xsim.sty
+++ b/Master/texmf-dist/tex/latex/xsim/xsim.sty
@@ -29,9 +29,9 @@
\ExplSyntaxOn
-\tl_const:Nn \c_xsim_date_tl {2020/02/21}
+\tl_const:Nn \c_xsim_date_tl {2020/02/23}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
-\tl_const:Nn \c_xsim_version_minor_number_tl {17}
+\tl_const:Nn \c_xsim_version_minor_number_tl {18}
\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 11ab475b2a2..31f5810bce5 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
@@ -73,7 +73,7 @@
}
{\endtrivlist}
-\DeclareExerciseEnvironmentTemplate{minimal}
+\DeclareExerciseEnvironmentTemplate{inline}
{%
\textbf{\GetExerciseProperty{counter}}%
\IfInsideSolutionF{%
@@ -88,5 +88,34 @@
}
{}
+\DeclareExerciseEnvironmentTemplate{minimal}
+ {\par\UseExerciseTemplate{begin}{inline}}
+ {\UseExerciseTemplate{end}{inline}\par}
+
+\DeclareExerciseEnvironmentTemplate{centered}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \hfil\textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}}\hfil
+ \par\noindent
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ }
+ {}
+
% ----------------------------------------------------------------------------
\endinput
+
+2020/02/23 - added: inline, centered
+ - adapt to removed \par from the generic environments