From a488c0e94aba29c7f7062852569792d58efda8dc Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 13 Feb 2022 03:00:36 +0000 Subject: CTAN sync 202202130300 --- macros/latex/contrib/xsim/xsim-manual.tex | 56 ++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 8 deletions(-) (limited to 'macros/latex/contrib/xsim/xsim-manual.tex') diff --git a/macros/latex/contrib/xsim/xsim-manual.tex b/macros/latex/contrib/xsim/xsim-manual.tex index 00ad03acc8..2b43735d36 100644 --- a/macros/latex/contrib/xsim/xsim-manual.tex +++ b/macros/latex/contrib/xsim/xsim-manual.tex @@ -1,5 +1,5 @@ -% !arara: pdflatex: { interaction: nonstopmode } -% !arara: biber +% arara: pdflatex: { interaction: nonstopmode } +% arara: biber % arara: pdflatex: { interaction: nonstopmode } % arara: pdflatex: { interaction: nonstopmode } % !arara: pdflatex: { interaction: nonstopmode } @@ -771,7 +771,8 @@ following code: \DeclareExerciseTagging{topics} \xsimsetup{tags/ignore-untagged=false} \end{sourcecode} -This means that these options are available: +For each new tag new options are defined and available. They are described +for the two predefined tags: \begin{options} \keyval{tags}{csv list of tags} Choose the set of tags whose associated exercises should be printed. @@ -783,6 +784,12 @@ This means that these options are available: \keybool{ignore-untagged}\Module{topics}\Default{true} If set to true exercises with no topics will be printed even if topics have been chosen with the option \option{topics}. + \keybool{use-unmatched}\Module{tags}\Default{false} + \sinceversion{0.21}If set to true exercises with no matching tags will be + used (i.e., for example the counter gets stepped). + \keybool{use-untagged}\Module{topics}\Default{true} + \sinceversion{0.21}If set to true exercises with no matching topics will + be used (i.e., for example the counter gets stepped). \end{options} It may happen that you choose certain tags for printing and want one or two @@ -981,6 +988,17 @@ collection can be printed as often as needed. exercises which fit the tags are automatically added to the new collection. \end{commands} +You\sinceversion{0.21} have a choice whether \emph{any} or \emph{all} of the +tags sould match. So \Oarg{topics=algebra,level=1} should probably match +\emph{all} conditions but the choice is up to you. For each defined collection +an option exists: +\begin{options} + \keybool{match-all}\Module{collection/\meta{name}}\Default{true} + If set to \code{true} \emph{all} conditions must be met. + \keybool{match-any}\Module{collection/\meta{name}}\Default{false} + The inverse option to \option{match-all}. If set to \code{true} \emph{any} of + the conditions must be met. +\end{options} \subsubsection{Activating collections} If a collection is not activated per default in can be activated (or @@ -999,7 +1017,7 @@ These commands do not influence exercises in other ways other than adding them to collections. \begin{commands} \command{collectexercises}[\marg{collection name}] - Activates the collection \meta{collection name} which now collects all + Activates the collectiocollectexercisesn \meta{collection name} which now collects all exercises until the collection is deactivated, starts a group with \cs*{begingroup} and sets the option \option{collect}, see below. \command{collectexercisesstop}[\marg{collection name}] @@ -1576,6 +1594,19 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate \item \code{\#5}: the \property{points} property of the exercise \item \code{\#6}: the \property{bonus-points} property of the exercise \end{itemize} + \command{ForEachUsedExerciseByOrder}[\marg{code}] + Loops\sinceversion{0.21} over each \emph{used} exercise ordered by the + exercise types and within each type by the order they have been used in + the document. Inside \meta{code} you can refer to several properties of + the corresponding exercise: + \begin{itemize} + \item \code{\#1}: the type of the exercise + \item \code{\#2}: the id of the exercise + \item \code{\#3}: the \property{counter} property of the exercise + \item \code{\#4}: the \property{subtitle} property of the exercise + \item \code{\#5}: the \property{points} property of the exercise + \item \code{\#6}: the \property{bonus-points} property of the exercise + \end{itemize} \command{ForEachPrintedExerciseByID}[\marg{code}] Loops over each \emph{printed} exercise order by the exercise id. Inside \meta{code} you can refer to several properties of the corresponding @@ -2148,7 +2179,7 @@ Those are the options for customization: Shortcut for setting both \option{blank-style} and \option{filled-style} at once. \keyval{scale}{decimal number}\Module{blank}\Default{\code{1}} -\textsc{} Scales the blank to \meta{decimal number} times its natural width. + Scales the blank to \meta{decimal number} times its natural width. \keyval{width}{dim}\Module{blank}\Default Sets the blank to a width of \meta{dim}. This takes precendence over \option{scale}. @@ -2161,7 +2192,10 @@ Those are the options for customization: end up with a non-ending compilation. Experiment with values to find the suiting one for your use case. \keyval{line-minimum-length}{dim}\Module{blank}\Default{\code{2em}} - The minimal length a line must have before it is built step by step. + The minimal length a line must have before it is built step by step. + \keybool{fill}\Module{blank}\Default{false} + If set to true, this will show the correct answers in the blanks within + an exercise as well. \end{options} \begin{example} @@ -2350,10 +2384,16 @@ also available in \xsim, too): This command can be used to write something to the external file \emph{before} the environment contents. Must be set before \cs{XSIMfilewritestart} in the \emph{begin} definition. + \command{XSIMsetfilebeginX}[\marg{code}] + \sinceversion{0.21}The same as \cs{XSIMsetfilebegin} but expands its + argument first. \command{XSIMsetfileend}[\marg{code}] This command can be used to write something to the external file \emph{after} the environment contents. Must be set before \cs{XSIMfilewritestart} in the \emph{begin} definition. + \command{XSIMsetfileendX}[\marg{code}] + \sinceversion{0.21}The same as \cs{XSIMsetfileend} but expands its + argument first. \command{XSIMgobblechars}[\marg{integer}] Determines how many characters are cut off of the beginning of each line of the environment body before it is written to the file. The default @@ -2368,8 +2408,8 @@ The following code shows an example of how to use those commands: \makeatletter \NewDocumentEnvironment{example}{o} {% - \XSIMsetfilebegin{\@percentchar\space file `\jobname.tmp'}% - \XSIMsetfileend{\@percentchar\space bye bye}% + \XSIMsetfilebeginX{\@percentchar\space file `\jobname.tmp'}% + \XSIMsetfileendX{\@percentchar\space bye bye}% \IfNoValueTF{#1} {\XSIMfilewritestart*{\jobname.tmp}} {\XSIMfilewritestart{\jobname.tmp}}% -- cgit v1.2.3