diff options
author | Karl Berry <karl@freefriends.org> | 2018-02-14 21:31:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-02-14 21:31:31 +0000 |
commit | 5dc958d03508be1e48423296a0b88d973ccd2d74 (patch) | |
tree | 28875c7c9fae9bb3c9c88120eddc1fb6663feb76 /Master/texmf-dist | |
parent | c9f9bf7a01281c0b591c5df6bac04399630bdf48 (diff) |
xsim (14feb18)
git-svn-id: svn://tug.org/texlive/trunk@46634 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
37 files changed, 340 insertions, 90 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/README b/Master/texmf-dist/doc/latex/xsim/README index 5f1ba9fa6e0..1c1284233fd 100644 --- a/Master/texmf-dist/doc/latex/xsim/README +++ b/Master/texmf-dist/doc/latex/xsim/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -XSIM 2017/09/19 v0.10 +XSIM 2018/02/12 v0.11 eXercise Sheets IMproved @@ -8,7 +8,7 @@ Clemens Niederberger Web: https://github.com/cgnieder/xsim E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2017 Clemens Niederberger +Copyright 2017--2018 Clemens Niederberger This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -81,6 +81,7 @@ The xsim package consists of the example files: xsim.texsx-369686.tex, xsim.texsx-369686.pdf xsim.texsx-370642.tex, xsim.texsx-370642.pdf xsim.texsx-391530.tex, xsim.texsx-391530.pdf + xsim.texsx-395273.tex, xsim.texsx-395273.pdf xsim.texwelt-6698.tex, xsim.texwelt-6698.pdf xsim.texwelt-15093.tex, xsim.texwelt-15093.pdf xsim.golatex-16824.tex, xsim.golatex-16824.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf Binary files differindex 76cf1617cbd..76cf1617cbd 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex index 3a324d4221f..5ccdff63a45 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex @@ -1,4 +1,4 @@ -% http://golatex.de/schueler-und-lehrerloesung-im-gleichen-texfile-t16824.html +% http://golatex.de/viewtopic,p,80640.html \documentclass[fontsize=12pt,parskip=half]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf Binary files differindex 97cb4659e06..97cb4659e06 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex index aa49dd64e1b..8ae03971c56 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex @@ -1,4 +1,4 @@ -% http://golatex.de/aufgabe-loesungs-umgebung-t18844.html +% http://golatex.de/viewtopic,p,91339.html \documentclass[18pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf Binary files differindex 6a6dab99cca..a34fbd8f79c 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex index 5fa3ed4ec8f..10a0bffed9e 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex @@ -21,7 +21,7 @@ \end{description} } -\newcommand\hint[1]{\SetExerciseProperty{\ExerciseType}{\ExerciseID}{hint}{#1}} +\newcommand\hint[1]{\SetExerciseProperty{hint}{#1}} \begin{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex index 48bf94cd6eb..1deafe5fb00 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex @@ -1,3 +1,4 @@ +% https://tex.stackexchange.com/q/391530 \documentclass{article} \usepackage{xsim} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf Binary files differnew file mode 100644 index 00000000000..c3796c8ee0c --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex new file mode 100644 index 00000000000..fe6152ed961 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex @@ -0,0 +1,74 @@ +\documentclass{article} +\usepackage{xsim,tcolorbox,needspace} + +% declare a boolean property: +\DeclareExerciseProperty*{short} +% declare a tag like property: +\DeclareExerciseTagging{level} + +% declare a template which typesets exercises differently according to given +% properties: +\DeclareExerciseEnvironmentTemplate{exercise} + {% + \renewcommand*\theenumi{\theexercise.\arabic{enumi}}% + \par\addvspace{\baselineskip} + \Needspace*{2\baselineskip} + \noindent + \GetExercisePropertyT{level}{\marginpar{\sffamily Level: #1}}% + \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}.} % + \GetExercisePropertyT{subtitle}{\textit{#1}}% + \IfExerciseBooleanPropertyF{short}{\par\noindent}% + } + {} + +% declare a tcolorbox template for the solutions: +\DeclareExerciseEnvironmentTemplate{solution} + {\tcolorbox[colback=yellow,colframe=red]} + {\endtcolorbox} + +% declare a user command for short answers: +\NewDocumentCommand\answer{m}{% + \IfSolutionPrintT{% + \UseExerciseTemplate{begin}{solution}% + #1% + \UseExerciseTemplate{end}{solution}% + }{}% +} + +% setup exercises and solutions: +\SetExerciseParameters{exercise}{ + exercise-template = exercise , + solution-template = solution +} + +% remove this option to hide the answers: +\xsimsetup{solution/print=true} + +\usepackage{lipsum} + +\begin{document} + +\begin{exercise}[level=hard,short] + Just a short exercise +\end{exercise} +\begin{solution} + The somewhat longer solution to the short exercise. \lipsum[1] +\end{solution} + +\begin{exercise}[subtitle=This one has a title,level=easy] + Answer the following questions. + \begin{enumerate} + \item question \answer{answer} + \item question \answer{answer} + \end{enumerate} +\end{exercise} + +\begin{exercise} + A long exercise. \lipsum[4]\answer{The answer} +\end{exercise} + +\begin{exercise}[level=medium,short] + Another short exercise.\answer{The answer} +\end{exercise} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf Binary files differindex b8f033c7599..d0406e830ce 100644 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.history b/Master/texmf-dist/doc/latex/xsim/xsim.history index 9c3ab5498e5..b0a2fe526bd 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim.history +++ b/Master/texmf-dist/doc/latex/xsim/xsim.history @@ -7,7 +7,7 @@ Clemens Niederberger Web: https://github.com/cgnieder/xsim E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2017 Clemens Niederberger +Copyright 2017--2018 Clemens Niederberger This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -99,3 +99,15 @@ HISTORY: - bug fix in \xsim_start_collection:nn - added further examples to package - new option `file-extension' + v0.10a 2017/10/01 - bug fix: grading table options can now be set with + \xsimsetup (issue 15) + v0.11 2018/02/12 - change name requirement for style files in order to + prevent possible name clashes with module files + - fix bug in \SetExerciseProperty and + \SetExpandedExerciseProperty + - fix bug when xsimverb is used standalone (issue 21) + - add option `split-aux-lists' (issue 18) + - \IfExerciseTagSetTF and \IfExerciseTopicSetTF + - introduce a \xsim_if_<tagging>_value:nTF for each tag + kind + - \ProvideExerciseTagging diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.ideas b/Master/texmf-dist/doc/latex/xsim/xsim.ideas index bb43c7fec07..29fa058fded 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim.ideas +++ b/Master/texmf-dist/doc/latex/xsim/xsim.ideas @@ -7,7 +7,7 @@ Clemens Niederberger Web: https://github.com/cgnieder/xsim E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- -Copyright 2017 Clemens Niederberger +Copyright 2017--2018 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/doc/latex/xsim/xsim_manual.pdf b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf Binary files differindex e38a1654029..2cc93eb00b0 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf +++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex index 96a6613159a..53c620c1bb7 100644 --- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex +++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex @@ -1,8 +1,8 @@ -% arara: pdflatex: { action: nonstopmode } +% !arara: pdflatex: { action: nonstopmode } % !arara: biber +% !arara: pdflatex: { action: nonstopmode } % arara: pdflatex: { action: nonstopmode } % arara: pdflatex: { action: nonstopmode } -% !arara: pdflatex: { action: nonstopmode } % ---------------------------------------------------------------------------- % the XSIM package % @@ -13,7 +13,7 @@ % Web: https://github.com/cgnieder/xsim % E-Mail: contact@mychemistry.eu % ---------------------------------------------------------------------------- -% Copyright 2017 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -51,7 +51,7 @@ \begin{document} -\section{Licence, Requirements and \textsc{readme}} +\section{Licence, Requirements and \texorpdfstring{\textsc{readme}}{README}} \license \xsim\ loads the packages \pkg{expl3}~\cite{bnd:l3kernel}, @@ -76,7 +76,7 @@ using an up to date \TeX\ distribution, anyway. It has been quite a while since I first published \pkg{exsheets}~\cite{pkg:exsheets} in June 2012. Since then it has gained a user base and a little bit of popularity as the number of questions on tex.sx -shows (103~at the time of writing)~\cite{texsx:tagged/exsheets}. User +shows (119~at the time of writing)~\cite{texsx:tagged/exsheets}. User questions, bug reports and feature requests improved it over the time. It still has a version number starting with a zero, though, which in my versioning system means I still consider it experimental. @@ -244,8 +244,8 @@ 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 enviroments write the contents of their bodies verbatim to external files -following a certain naming structure: +Both the exercise and the solution enviroments write the contents of their +bodies verbatim to external files following a certain naming structure: \begin{itemize} \item \code{\meta{jobname}-\meta{type}-\meta{id}-exercise|solution-body.tex} @@ -258,18 +258,18 @@ example have been written to files named \item \verbcode+xsim_manual-exercise-1-exercise-body.tex+ and \item \verbcode+xsim_manual-exercise-1-solution-body.tex+, respectively. \end{itemize} -Details on the \meta{type} of an exercise will be given in -section~\vref{sec:new-exercise-types}. \emph{The \meta{id} of an exercise is - a positive integer unique to each exercise environment regardless if the - exercise is being printed or used at all.} - These external files are input when the respective exercise or solution is printed. An advantage of using external files is that \emph{verbatim material - is allowed} inside the environments. Each of those files contains some -information about itself and where and why it was generated\footnote{In this - example the sourcecode line number is misleading as the example where the - file was generated itself was an external file where the \env{exercise} - environment indeed \emph{was} on line~1.}: + is allowed} inside the environments. Details on the \meta{type} of an +exercise will be given in section~\vref{sec:new-exercise-types}. \emph{The + \meta{id} of an exercise is a positive integer unique to each exercise + environment regardless if the exercise is being printed or used at all.} + +Each of those files contains some information about itself and where and why +it was generated\footnote{In this example the sourcecode line number is + misleading as the example where the file was generated itself was an + external file where the \env{exercise} environment indeed \emph{was} on + line~1.}: \inputsourcecode{exercises/xsim_manual-exercise-1-exercise-body.tex} @@ -288,10 +288,10 @@ order to deal with this somehow \xsim\ offers the following option: \end{options} Another thing to keep in mind: the environment in many ways works the same way -as the \env{filecontents}. \emph{This also means that you \emph{cannot} have - comments on the first line of the environments:} +as the \env{filecontents} environment. \emph{This also means that you + \emph{cannot} have comments on the first line of the environments:} \begin{sourcecode} - \begin{exercise}[points=2] % this will cause trouble + \begin{exercise}[points=2] % this comment will cause trouble Lorem ipsum \end{exercise} \end{sourcecode} @@ -313,6 +313,23 @@ as the \env{filecontents}. \emph{This also means that you \emph{cannot} have Using the \option{clear-aux} option might help to reduce erroneous exercises. \end{bewareofthedog} +\begin{bewareofthedog} + A lot of the lines \xsim\ writes to the auxfile and reads in a subsequent + run look like this: +\begin{sourcecode} + \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 + inside properties. This is why \xsim\ provides an option to change this + marker. +\end{bewareofthedog} +\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. +\end{options} + \section{New Exercise Types}\label{sec:new-exercise-types} It is easy to define new exercise environments together with a corresponding @@ -479,6 +496,10 @@ Exercise like the \env{exercise} environment and possibly others defined with Holds the chapter counter value of an exercise (\ie, what you usually know as \cs*{arabic}\Marg{chapter}). \emph{Only if a command \cs*{chapter} \emph{and} a counter \code{chapter} exist.} + \propval{sectioning}{section numbers} + Holds five brace groups which in turn hold the section numbers (integers) + of the exercise in the order + \marg{chapter}\marg{section}\marg{subsection}\marg{subsubsection}\marg{paragraph}. \end{properties} Some of these \acsp*{prop} are fixed and cannot be set by the user. Those @@ -679,6 +700,9 @@ and how to use exercise tags for selection. property named \meta{tag}. In addition two options are defined: an option named \code{\meta{tag}} which can be used for selection and an boolean option \code{\meta{tag}/ignore-untagged}. + \command{ProvideExerciseTagging}[\marg{tag}] + The\sinceversion{0.11} same as \cs{DeclareExerciseTagging} but does + nothing when \meta{tag} already exists. \end{commands} The two existing tagging groups have been defined and preset with the following code: @@ -998,6 +1022,9 @@ At last now an example using external files, collections and tags: \section{Printing Random Exercises From a Collection} \xsim\ provides the possibility of selecting random exercises from a collection (\cf~section~\vref{sec:collecting-exercises}). +\begin{bewareofthedog} + Please be aware that this feature is \emph{not} available in \XeLaTeX! +\end{bewareofthedog} \begin{commands} \command{printrandomexercises}[\oarg{options}\marg{number}] This command prints \meta{number} random exercises from the collection @@ -1356,6 +1383,14 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate \meta{between} as a separator and \meta{between last two} as separator between the last two tags of the list. If the list only consists of two tags \meta{between two} is used as separator. + \command{IfExerciseTagSet\TF}[\marg{value}\marg{true}\marg{false}] + In\sinceversion{0.11} order to insert text (also \emph{outside} of + exercises) depending on the chosen tags this command lets you check if + value \meta{value} has been set for \property{tags}. + \command{IfExerciseTopicSet\TF}[\marg{value}\marg{true}\marg{false}] + In\sinceversion{0.11} order to insert text (also \emph{outside} of + exercises) depending on the chosen tags this command lets you check if + value \meta{value} has been set for \property{topics}. \end{commands} \subsubsection{Further Commands for Usage in Template Definitions} @@ -1379,7 +1414,7 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate exercise type or -- if no type has been given -- to \meta{code}. \expandable\command{IfInsideSolution\TF}[\marg{true}\marg{false}] Tests if the template is used inside a solution environment or not. - \expandable\command{IfPrintSolution\TF}[\marg{true}\marg{false}] + \expandable\command{IfSolutionPrint\TF}[\marg{true}\marg{false}] Tests if the option \option{print} for the solutions of the current \cs{ExerciseType} is set to \code{true} or \code{false}. \command{IfExistSolution\TF}[\marg{true}\marg{false}] @@ -2057,11 +2092,12 @@ The usage is now as follows: \subsection{\dots Create and Use \xsim\ Style Files?}\label{sec:style-files} \index{style file|(} -\xsim\ 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: +\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.math-exam.code.tex} + \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 @@ -2091,11 +2127,11 @@ code~11 (letter). The formal description of the commands: \begin{commands} \command{xsimstyle}[\sarg\marg{style name}] - The first command in a \xsim\ style file called \code{xsim.\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.}. + 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} @@ -2242,8 +2278,8 @@ The repository of this package\footnote{GitHub: \url{http://www.ctan.org/pkg/xsim/}} currently includes \theexamplefiles~example documents demonstrating how different aspects of this package work or how different kinds of problems can be solved or how different -kinds of layouts can be achieved as well as how solve concrete problems that -have come up in different \LaTeX\ forums. +kinds of layouts can be achieved as well as how to solve concrete problems +that have come up in different \LaTeX\ forums. \listexamplefiles diff --git a/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls b/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls index 23fb8db3f24..1db5337a58b 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -126,6 +126,12 @@ IfExerciseTypeGoalsSumF , IfExerciseTypeGoalsSumT , IfExerciseTypeGoalsSumTF , + IfExerciseTagSetF , + IfExerciseTagSetT , + IfExerciseTagSetTF , + IfExerciseTopicSetF , + IfExerciseTopicSetT , + IfExerciseTopicSetTF , IfInsideSolutionF , IfInsideSolutionT , IfInsideSolutionTF , @@ -143,6 +149,7 @@ printsolutions , printsolutionstype , PropertyValue , + ProvideExerciseTagging , SaveExerciseProperty , SetExerciseParameter , SetExerciseParameters , @@ -678,6 +685,38 @@ % ---------------------------------------------------------------------------- +\ExplSyntaxOn +\cs_set:Npn \__xsim_get_texsx_number:w texsx- #1 \q_stop: {#1} +\cs_set:Npn \__xsim_get_texwelt_number:w texwelt- #1 \q_stop: {#1} +\cs_set:Npn \__xsim_get_golatex_number:w golatex- #1 \q_stop: {#1} + +\newcommand* \xsim@example@links [1] { + \href { \xsim@example@texfile@path {#1} } { \color{white} [\TeX] } ~ + \href { \xsim@example@pdffile@path {#1} } { \color{white} [PDF] } + \tl_if_in:nnT {#1} {texsx} + { + \tl_set:Nx \l_tmpa_tl { \__xsim_get_texsx_number:w #1 \q_stop: } + \space \href + { https \c_colon_str //tex.stackexchange.com/q/ \l_tmpa_tl / } + { \color {white} [forum] } + } + \tl_if_in:nnT {#1} {texwelt} + { + \tl_set:Nx \l_tmpa_tl { \__xsim_get_texwelt_number:w #1 \q_stop: } + \space \href + { http \c_colon_str //texwelt.de/wissen/fragen/ \l_tmpa_tl / } + { \color {white} [forum] } + } + \tl_if_in:nnT {#1} {golatex} + { + \tl_set:Nx \l_tmpa_tl { \__xsim_get_golatex_number:w #1 \q_stop: } + \space \href + { http \c_colon_str //golatex.de/viewtopic,p, \l_tmpa_tl .html } + { \color {white} [forum] } + } +} +\ExplSyntaxOff + \newcounter{examplefile} \newcounter{examplefiles} \newcommand*\xsim@add@example[1]{% @@ -695,8 +734,7 @@ sidebyside gap=0pt, lower separated=false, title=Example~\theexamplefile\ \enquote{\texttt{##1}} - \href{\xsim@example@texfile@path{##1}}{\color{white}[\TeX]} - \href{\xsim@example@pdffile@path{##1}}{\color{white}[PDF]}% + \xsim@example@links{##1}% ] \bookmark[level=2,dest=examplefile.\arabic{examplefile}]{Example~\theexamplefile\ (##1)}% \lstinputlisting[style=cnltx,lastline=10]{\xsim@example@texfile@path{##1}} @@ -739,10 +777,11 @@ \xsim@add@example{texsx-369803} \xsim@add@example{texsx-370642} \xsim@add@example{texsx-391530} +\xsim@add@example{texsx-395273} \xsim@add@example{texwelt-6698} \xsim@add@example{texwelt-15093} -\xsim@add@example{golatex-16824} -\xsim@add@example{golatex-18844} +\xsim@add@example{golatex-80640} +\xsim@add@example{golatex-91339} % ---------------------------------------------------------------------------- @@ -771,11 +810,13 @@ \xsim@add@layout{runin}[\renewcommand*\theexercise{\arabic{exercise}.}] \xsim@add@layout{margin}[\renewcommand*\theexercise{\arabic{exercise}.}] -\xsim@add@version{0.8} {2017-05-18} -\xsim@add@version{0.8a} {2017-05-19} -\xsim@add@version{0.8b} {2017-05-23} -\xsim@add@version{0.9} {2017-06-20} -\xsim@add@version{0.10} {2017-09-19} +\xsim@add@version{0.8} {2017-05-18} +\xsim@add@version{0.8a} {2017-05-19} +\xsim@add@version{0.8b} {2017-05-23} +\xsim@add@version{0.9} {2017-06-20} +\xsim@add@version{0.10} {2017-09-19} +\xsim@add@version{0.10a} {2017-10-04} +\xsim@add@version{0.11} {2018-02-12} % ---------------------------------------------------------------------------- \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 2959a910915..e5eff8b7287 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -54,6 +54,13 @@ % list for recording values that need to be written to the aux file and % updated at begin document +\str_new:N \l__xsim_split_aux_lists_str +\keys_define:nn {xsim} + { + split-aux-lists .code:n = \str_set:Nn \l__xsim_split_aux_lists_str {#1} , + split-aux-lists .initial:n = || + } + % define list: % #1: name \cs_new_protected:Npn \xsim_new_list:n #1 @@ -67,7 +74,8 @@ \prop_gclear:c {g__xsim_list_#1_prop} \tl_if_blank:nF {##1} { - \seq_gset_split:cnx {g__xsim_list_#1_seq} {|} + \seq_gset_split:cVx {g__xsim_list_#1_seq} + \l__xsim_split_aux_lists_str { \tl_to_str:n {##1} } \seq_map_inline:cn {g__xsim_list_#1_seq} { \prop_gput:cnn {g__xsim_list_#1_prop} {####1} {} } @@ -99,10 +107,6 @@ \seq_gput_right:cV {g__xsim_list_#1_seq} \l__xsim_tmpa_str } \cs_generate_variant:Nn \xsim_add_to_list:nn {nx} -\cs_generate_variant:Nn \seq_if_in:NnT {cV} -\cs_generate_variant:Nn \seq_gremove_all:Nn {cV} -\cs_generate_variant:Nn \seq_gput_right:Nn {cV} -\cs_generate_variant:Nn \seq_gset_split:Nnn {cnx} % #1: name % #2: entry @@ -154,7 +158,7 @@ \bool_if:NF \l__xsim_empty_lists_bool { \xsim_add_cs_to_aux:nn {#1} - { { \seq_use:cn {g__xsim_list_#1_seq} {|} } } + { { \seq_use:cV {g__xsim_list_#1_seq} \l__xsim_split_aux_lists_str } } } } 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 abec4de0501..32fee6e1bd3 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -32,9 +32,13 @@ % ---------------------------------------------------------------------------- % variants of kernel functions: \cs_generate_variant:Nn \seq_set_split:Nnn {Nnx,NV} -\cs_generate_variant:Nn \seq_gset_split:Nnn {c} +\cs_generate_variant:Nn \seq_gset_split:Nnn {c,cVx,cnx} +\cs_generate_variant:Nn \seq_use:Nn {cV} \cs_generate_variant:Nn \seq_count:N {c} \cs_generate_variant:Nn \seq_if_empty:NT {c} +\cs_generate_variant:Nn \seq_if_in:NnT {cV} +\cs_generate_variant:Nn \seq_gremove_all:Nn {cV} +\cs_generate_variant:Nn \seq_gput_right:Nn {cV} \cs_generate_variant:Nn \prop_put:Nnn {cxx} \cs_generate_variant:Nn \prop_gput:Nnn {Nx,Nnx,cxx} \cs_generate_variant:Nn \prop_item:Nn {c} @@ -54,6 +58,7 @@ \cs_generate_variant:Nn \iow_now:Nn {NV} \cs_generate_variant:Nn \str_if_eq:nnT {x} \cs_generate_variant:Nn \iow_now:Nn {NV} +\cs_generate_variant:Nn \prg_new_protected_conditional:Npnn {c} % ---------------------------------------------------------------------------- % temporary variables: 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 55b1db7cf45..97a37e2f711 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 Clemens Niederberger +% Copyright 2017--2018 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.collections.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex index e3945e86a43..62c963d6313 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 Clemens Niederberger +% Copyright 2017--2018 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.definitions.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex index 824da2241ea..1c27ad960a9 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 Clemens Niederberger +% Copyright 2017--2018 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.environments.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex index aa89ce5ee2c..ac12cb51539 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 Clemens Niederberger +% Copyright 2017--2018 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.exercises.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex index 185544564f5..a269fe2c5d0 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 Clemens Niederberger +% Copyright 2017--2018 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.goals.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex index d537754fa72..ab8662ad71b 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 Clemens Niederberger +% Copyright 2017--2018 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.grades.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex index 141aaa3da3f..4c25e99b456 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 Clemens Niederberger +% Copyright 2017--2018 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 2c9f0c56449..32beb122083 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -146,11 +146,11 @@ { \xsim_make_property_alias:nn {#1} {#2} } \@onlypreamble \DeclareExercisePropertyAlias -\NewDocumentCommand \SetExerciseProperty {mmm+m} - { \xsim_set_property:xxnn {\ExerciseType} {\ExerciseID} {#3} {#4} } +\NewDocumentCommand \SetExerciseProperty {m+m} + { \xsim_set_property:xxnn {\ExerciseType} {\ExerciseID} {#1} {#2} } -\NewDocumentCommand \SetExpandedExerciseProperty {mmm+m} - { \xsim_set_property:xxnx {\ExerciseType} {\ExerciseID} {#3} {#4} } +\NewDocumentCommand \SetExpandedExerciseProperty {m+m} + { \xsim_set_property:xxnx {\ExerciseType} {\ExerciseID} {#1} {#2} } \NewDocumentCommand \ExerciseSetProperty {mmm+m} { \xsim_set_property:nnnn {#1} {#2} {#3} {#4} } @@ -443,6 +443,13 @@ { \xsim_new_tag_type:n {#1} } \@onlypreamble \DeclareExerciseTagging +\NewDocumentCommand \ProvideExerciseTagging {m} + { + \xsim_if_tag_type_exists:nTF {#1} + { \msg_warning:nnn {xsim} {tag-exists} {#1} } + { \xsim_new_tag_type:n {#1} } + } + \NewDocumentCommand \ForEachExerciseTag {m+m} { \xsim_foreach_exercise_tag:oonn {\ExerciseType} {\ExerciseID} {#1} {#2} } @@ -460,6 +467,20 @@ {#4} } +\NewDocumentCommand \IfExerciseTagSetTF {m+m+m} + { \xsim_if_tags_value:nTF {#1} {#2} {#3} } +\NewDocumentCommand \IfExerciseTagSetT {m+m} + { \xsim_if_tags_value:nT {#1} {#2} } +\NewDocumentCommand \IfExerciseTagSetF {m+m} + { \xsim_if_tags_value:nF {#1} {#2} } + +\NewDocumentCommand \IfExerciseTopicSetTF {m+m+m} + { \xsim_if_topic_value:nTF {#1} {#2} {#3} } +\NewDocumentCommand \IfExerciseTopicSetT {m+m} + { \xsim_if_topic_value:nT {#1} {#2} } +\NewDocumentCommand \IfExerciseTopicSetF {m+m} + { \xsim_if_topic_value:nF {#1} {#2} } + % ---------------------------------------------------------------------------- \NewDocumentCommand \ForEachPrintedExerciseByType {+m} @@ -544,12 +565,12 @@ } % ---------------------------------------------------------------------------- - + \NewDocumentCommand \gradingtable {O{}} { \group_begin: - \keys_set:nn {xsim/grading-table} { template = default , type = , #1} - \xsim_setup_template:nnV {table} \l_xism_grading_table_template_tl + \keys_set:nn {xsim/grading-table} {#1} + \xsim_setup_template:nVn {table} \l_xism_grading_table_template_tl { \providecommand* \ExerciseTableCode {} \providecommand* \ExerciseTableType [1] {} 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 a2913f4ad80..9337dc2073a 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -198,14 +198,15 @@ % style files \NewDocumentCommand \xsimstyle {smO{}} { - \__xsim_module:nn {#2} {#3} + \__xsim_module:nn {style.#2} {#3} \IfBooleanT {#1} { \ExplSyntaxOn } } \cs_new_protected:Npn \xsim_style_options:nn #1#2 { \keys_define:nn {xsim/#1} {#2} } -\NewDocumentCommand \loadxsimstyle {m} { \xsim_load_modules:n {#1} } +\NewDocumentCommand \loadxsimstyle {m} + { \clist_map_inline:nn {#1} { \xsim_load_module:n {style.##1} } } % -------------------------------------------------------------------------- \file_input_stop: 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 a932faf4472..06558868cb0 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 Clemens Niederberger +% Copyright 2017--2018 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.random.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex index 0730d04d454..e8bddf2a10d 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -27,6 +27,16 @@ % ---------------------------------------------------------------------------- \XSIMmodule{random}{randomly select exercises from collections} +\msg_new:nnn {xsim} {random-numbers-unavailable} + { + You~ are~ compiling~ your~ document~ using ~XeLaTeX.~ Please~ be~ aware~ + that~ random~ selection~ of~ exercises~ is~ unavailable~ in~ XeLaTeX.~ If~ + you~ use~ this~ feature~ you~ can~ safely~ ignore~ this~ message. + } + +\sys_if_engine_xetex:T + { \msg_warning:nn {xsim} {random-numbers-unavailable} } + \xsim_load_modules:n {collections} \tl_new:N \l_xsim_random_collection_tl 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 6855f635968..b8ac06aca03 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 Clemens Niederberger +% Copyright 2017--2018 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 b7ce1cf4b3f..93747223979 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 Clemens Niederberger +% Copyright 2017--2018 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 {2017/09/19} +\tl_const:Nn \c_xsim_date_tl {2018/02/12} \tl_const:Nn \c_xsim_version_major_number_tl {0} -\tl_const:Nn \c_xsim_version_minor_number_tl {10} +\tl_const:Nn \c_xsim_version_minor_number_tl {11} \tl_const:Nn \c_xsim_version_subrelease_tl {} \tl_const:Nx \c_xsim_version_number_tl { @@ -54,7 +54,7 @@ % -------------------------------------------------------------------------- % options, information - + \bool_new:N \g_xsim_final_bool \bool_new:N \g_xsim_verbose_bool \bool_new:N \g_xsim_clear_aux_bool diff --git a/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex b/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex index 3b94b6cc518..e8a43b0992d 100644 --- a/Master/texmf-dist/tex/latex/xsim/xsim.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 Clemens Niederberger +% Copyright 2017--2018 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 57e0dfd38bf..4fac1762f8e 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -40,6 +40,9 @@ } \cs_generate_variant:Nn \xsim_set_seq_from_clist:Nn {c,Nx} +\msg_new:nnn {xsim} {tag-exists} + { The~ tag~ type~ `#1'~ already~ exists.~ I~ am~ doing~ nothing. } + % #1: name \cs_new_protected:Npn \xsim_new_tag_type:n #1 { @@ -56,6 +59,12 @@ #1 .code:n = \xsim_set_seq_from_clist:cn {l__xsim_chosen_tags_#1_seq} {##1} } + \prg_new_protected_conditional:cpnn {xsim_if_#1_value:n} ##1 {T,F,TF} + { + \seq_if_in:cnTF {l__xsim_chosen_tags_#1_seq} {##1} + { \prg_return_true: } + { \prg_return_false: } + } \xsim_declare_property:nnnn { \c_false_bool } { \c_false_bool } @@ -78,6 +87,14 @@ } % #1: tag type +\prg_new_protected_conditional:Npnn \xsim_if_tag_type_exists:n #1 {T,F,TF} + { + \seq_if_in:NnTF \l__xsim_tag_types_seq {#1} + { \prg_return_true: } + { \prg_return_false: } + } + +% #1: tag type % #2: exercise type % #3: id % #4: print|use 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 fa62e3f96c4..9ed767f4a7a 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -133,7 +133,7 @@ % #3: setup code \cs_new_protected:Npn \xsim_setup_template:nnn #1#2#3 { \tl_set:cn {l__xsim_template_#1_#2_setup_tl} {#3} } -\cs_generate_variant:Nn \xsim_setup_template:nnn {nnV} +\cs_generate_variant:Nn \xsim_setup_template:nnn {nnV,nVn} % #1: template type % #2: template name 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 83feaf8169d..e398575c40e 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 Clemens Niederberger +% Copyright 2017--2018 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 748550657d5..83124c5ff26 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 Clemens Niederberger +% Copyright 2017--2018 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/xsimverb.sty b/Master/texmf-dist/tex/latex/xsim/xsimverb.sty index ec5fbd14dde..8064d0d06d7 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 Clemens Niederberger +% Copyright 2017--2018 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -52,6 +52,30 @@ {\c_xsimverb_version_tl} {\c_xsimverb_info_tl} +% options, information + +\bool_new:N \g_xsim_final_bool +\bool_new:N \g_xsim_verbose_bool +\bool_new:N \g_xsim_clear_aux_bool + +\keys_define:nn {xsim} + { + final .bool_gset:N = \g_xsim_final_bool , + verbose .bool_gset:N = \g_xsim_verbose_bool , + clear-aux .bool_gset:N = \g_xsim_clear_aux_bool + } + +\DeclareOption {final} + { \bool_gset_true:N \g_xsim_final_bool } + +\DeclareOption {verbose} + { \bool_gset_true:N \g_xsim_verbose_bool } + +\DeclareOption {clear-aux} + { \bool_gset_true:N \g_xsim_clear_aux_bool } + +\ProcessOptions \scan_stop: + % -------------------------------------------------------------------------- % load module mechanism: @@ -64,3 +88,6 @@ % -------------------------------------------------------------------------- \file_input_stop: + +2018/01/31 - define xsim's options as dummy options to prevent possible errors + caused by undefined booleans |