texlive[46634] Master/texmf-dist: xsim (14feb18)
commits+karl at tug.org
commits+karl at tug.org
Wed Feb 14 22:31:32 CET 2018
Revision: 46634
http://tug.org/svn/texlive?view=revision&revision=46634
Author: karl
Date: 2018-02-14 22:31:31 +0100 (Wed, 14 Feb 2018)
Log Message:
-----------
xsim (14feb18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/xsim/README
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf
trunk/Master/texmf-dist/doc/latex/xsim/xsim.history
trunk/Master/texmf-dist/doc/latex/xsim/xsim.ideas
trunk/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
trunk/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
trunk/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.sty
trunk/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsimverb.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf
trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex
trunk/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex
Modified: trunk/Master/texmf-dist/doc/latex/xsim/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/README 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/README 2018-02-14 21:31:31 UTC (rev 46634)
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-XSIM 2017/09/19 v0.10
+XSIM 2018/02/12 v0.11
eXercise Sheets IMproved
@@ -8,7 +8,7 @@
Web: https://github.com/cgnieder/xsim
E-Mail: contact at 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 @@
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
Deleted: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -1,131 +0,0 @@
-% http://golatex.de/schueler-und-lehrerloesung-im-gleichen-texfile-t16824.html
-\documentclass[fontsize=12pt,parskip=half]{scrartcl}
-\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
-\usepackage[ngerman]{babel}
-
-\newlength\breite
-\setlength\breite{160mm}
-\newlength\hoehe
-\setlength\hoehe{80mm}
-
-\usepackage[
- hdivide={3.0cm,\breite,},
- vdivide={2.2cm,,2.2cm}]{geometry}
-\usepackage[bitstream-charter]{mathdesign}
-
-\usepackage[babel]{microtype}
-
-\usepackage[inline]{enumitem}
-
-\usepackage{amsmath,siunitx}
-\sisetup{
- locale = DE ,
- per-mode = fraction
-}
-
-\usepackage{xsim,needspace,tikz,tcolorbox}
-
-\xsimsetup{
- exercise/template = gitter ,
- solution/template = gitter
-}
-
-\DeclareExerciseEnvironmentTemplate{gitter}
- {%
- \IfInsideSolutionT{%
- \tcolorbox[
- detach title ,
- title = Lösung: ,
- before upper = {\tcbtitle\space} ,
- fonttitle = \bfseries ,
- fontupper = \large ,
- valign = center ,
- colframe = black!50!white ,
- colback = black!12!white ,
- coltext = blue ,
- coltitle = blue ,
- height = \hoehe ,
- width = \breite ,
- sharp corners
- ]
- }%
- }
- {%
- \IfInsideSolutionTF
- {\endtcolorbox}
- {%
- \IfSolutionPrintF{%
- \par
- \begin{tikzpicture}[semitransparent]
- \draw[step=4mm, line width=0.15mm, black!60!white] (0,0) grid
- (\breite,\hoehe);
- \end{tikzpicture}
- \par
- }
- }%
- }
-
-\begin{document}
-
-\begin{exercise}
- Für die \textbf{Schülerausgabe} sollen Häuschen (Grid) mit Seitenlänge
- \SI{4}{\mm} gesetzt werden.
-\end{exercise}
-\begin{solution}
- Hier soll die Lösung stehen: $E=m\cdot c^2$.
-\end{solution}
-
-\xsimsetup{solution/print=true}
-
-\begin{exercise}
- Für die \textbf{Lehrerausgabe} sollen statt Häuschen die Lösung in
- z.\,B. einer Box geschrieben werden. Dafür soll die Lösung (bezogen auf
- dieses Beispiel) auch in einer Box mit der exakten Breite \SI{160}{\mm} und
- der exakten Höhe \SI{80}{\mm} gesetzt werden. Weiter soll natürlich die
- Position der Lösungsbox und der Häuschenbox exakt identisch sein.
-\end{exercise}
-\begin{solution}
- Hier soll die Lösung stehen: $E=m\cdot c^2$.
-\end{solution}
-
-\clearpage
-
-\begin{exercise}
- Beschreiben Sie die \textbf{Satzgruppe des Pythagoras}.
-\end{exercise}
-\begin{solution}
- \begin{align*}
- \left.\begin{aligned}
- c^2 &=a^2+b^2\\
- a^2 &=p\cdot c\;\wedge\; b^2=q\cdot c\\
- h^2 &=p\cdot q
- \end{aligned}\right\}
- \begin{gathered}
- \text{Satzgruppe}\\
- \text{des Pythagoras}
- \end{gathered}
- \end{align*}
-\end{solution}
-
-\begin{exercise}
- Geben Sie die Formel der \textbf{gleichförmigen Bewegung} wieder. Gehen Sie
- davon aus, dass Sie 1000~Meter in
- \SI[parse-numbers=false]{3\frac{1}{2}}{Minuten} laufen.
- \begin{enumerate*}[label=\bfseries\alph*)]
- \item Mit welcher Geschwindigkeit legen Sie die Strecke zurück?
- \item Geben Sie die Geschwindigkeit in \si{\km\per\hour} an.
- \end{enumerate*}
- \textbf{Hinweis:} Nehmen Sie zur Berechnung die vereinfachte Form und gehen
- Sie davon aus, dass Ihre Geschwindigkeit konstant ist.
-\end{exercise}
-\begin{solution}
- \begin{align*}
- s &=v\cdot t+s_0 \\
- 1000 &=v\cdot 210 \\
- v &=\frac{\SI{1000}{\m}}{\SI{210}{\second}} \\
- v &=\SI{4.76}{\m\per\second} = \SI{17.1}{\km\per\hour}
- \end{align*}
-\end{solution}
-
-\end{document}
Deleted: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf
===================================================================
(Binary files differ)
Deleted: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -1,94 +0,0 @@
-% http://golatex.de/aufgabe-loesungs-umgebung-t18844.html
-\documentclass[18pt,a4paper]{article}
-\usepackage[utf8]{inputenc}
-\usepackage[ngerman]{babel}
-
-\usepackage{xsim,tcolorbox}
-\usepackage{amsmath}
-\xsimsetup{
- exercise/within = section ,
- exercise/the-counter = \thesection.\arabic{exercise} ,
- print-solutions/headings-template=none
-}
-\SetExerciseParameters{exercise}{
- exercise-template = mine ,
- solution-template = mine
-}
-
-\DeclareExerciseEnvironmentTemplate{mine}
- {%
- \tcolorbox[
- % colors:
- colback = white , colframe = black , coltitle = black ,
- % rules:
- boxrule = 0pt , toprule = 1pt , bottomrule = 1pt , arc = 0pt ,
- % spacing:
- boxsep = 0pt , left = 0pt , right = 0pt ,
- % title:
- detach title , before upper = \tcbtitle\par\noindent ,
- fonttitle = \bfseries ,
- title = \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}
- ]
- }
- {\endtcolorbox}
-
-\DeclareExerciseTranslation{German}{exercise}{Aufgabe}
-\DeclareExerciseTagging{difficulty}
-
-\begin{document}
-
-\section{Wellenausbreitung im Vakuum und in Materie}
-\subsection{Maxwellsche Gleichungen}
-
-\begin{align*}
- \nabla \cdot \vec{E}\left(\vec{r}, t \right) =
- \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0}
-\end{align*}
-
-\begin{exercise}[difficulty=easy]
-Something stupid
-\end{exercise}
-\begin{solution}
-Here is a nonstupid solution for your problem
-\end{solution}
-
-\subsection{Empirischer Zugang zu Wellengleichungen}
-
-\begin{exercise}[difficulty=hard]
-Eine weitere Aufgabe
-\end{exercise}
-\begin{solution}
-Solution Number 2
-\end{solution}
-
-\subsection*{Lösungen}
-\printsolutions[section,difficulty=hard]
-
-\section{Wellenausbreitung im Vakuum und in Materie}
-\subsection{Maxwellsche Gleichungen}
-
-\begin{align*}
- \nabla \cdot \vec{E}\left(\vec{r}, t \right) =
- \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0}
-\end{align*}
-
-\begin{exercise}[difficulty=easy]
-Something stupid
-\end{exercise}
-\begin{solution}
-Here is a nonstupid solution for your problem
-\end{solution}
-
-\subsection{Empirischer Zugang zu Wellengleichungen}
-
-\begin{exercise}[difficulty=hard]
-Eine weitere Aufgabe
-\end{exercise}
-\begin{solution}
-Solution Number 2
-\end{solution}
-
-\subsection*{Lösungen}
-\printsolutions[section]
-
-\end{document}
Added: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf 2018-02-14 21:31:31 UTC (rev 46634)
Property changes on: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -0,0 +1,131 @@
+% http://golatex.de/viewtopic,p,80640.html
+\documentclass[fontsize=12pt,parskip=half]{scrartcl}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[ngerman]{babel}
+
+\newlength\breite
+\setlength\breite{160mm}
+\newlength\hoehe
+\setlength\hoehe{80mm}
+
+\usepackage[
+ hdivide={3.0cm,\breite,},
+ vdivide={2.2cm,,2.2cm}]{geometry}
+\usepackage[bitstream-charter]{mathdesign}
+
+\usepackage[babel]{microtype}
+
+\usepackage[inline]{enumitem}
+
+\usepackage{amsmath,siunitx}
+\sisetup{
+ locale = DE ,
+ per-mode = fraction
+}
+
+\usepackage{xsim,needspace,tikz,tcolorbox}
+
+\xsimsetup{
+ exercise/template = gitter ,
+ solution/template = gitter
+}
+
+\DeclareExerciseEnvironmentTemplate{gitter}
+ {%
+ \IfInsideSolutionT{%
+ \tcolorbox[
+ detach title ,
+ title = Lösung: ,
+ before upper = {\tcbtitle\space} ,
+ fonttitle = \bfseries ,
+ fontupper = \large ,
+ valign = center ,
+ colframe = black!50!white ,
+ colback = black!12!white ,
+ coltext = blue ,
+ coltitle = blue ,
+ height = \hoehe ,
+ width = \breite ,
+ sharp corners
+ ]
+ }%
+ }
+ {%
+ \IfInsideSolutionTF
+ {\endtcolorbox}
+ {%
+ \IfSolutionPrintF{%
+ \par
+ \begin{tikzpicture}[semitransparent]
+ \draw[step=4mm, line width=0.15mm, black!60!white] (0,0) grid
+ (\breite,\hoehe);
+ \end{tikzpicture}
+ \par
+ }
+ }%
+ }
+
+\begin{document}
+
+\begin{exercise}
+ Für die \textbf{Schülerausgabe} sollen Häuschen (Grid) mit Seitenlänge
+ \SI{4}{\mm} gesetzt werden.
+\end{exercise}
+\begin{solution}
+ Hier soll die Lösung stehen: $E=m\cdot c^2$.
+\end{solution}
+
+\xsimsetup{solution/print=true}
+
+\begin{exercise}
+ Für die \textbf{Lehrerausgabe} sollen statt Häuschen die Lösung in
+ z.\,B. einer Box geschrieben werden. Dafür soll die Lösung (bezogen auf
+ dieses Beispiel) auch in einer Box mit der exakten Breite \SI{160}{\mm} und
+ der exakten Höhe \SI{80}{\mm} gesetzt werden. Weiter soll natürlich die
+ Position der Lösungsbox und der Häuschenbox exakt identisch sein.
+\end{exercise}
+\begin{solution}
+ Hier soll die Lösung stehen: $E=m\cdot c^2$.
+\end{solution}
+
+\clearpage
+
+\begin{exercise}
+ Beschreiben Sie die \textbf{Satzgruppe des Pythagoras}.
+\end{exercise}
+\begin{solution}
+ \begin{align*}
+ \left.\begin{aligned}
+ c^2 &=a^2+b^2\\
+ a^2 &=p\cdot c\;\wedge\; b^2=q\cdot c\\
+ h^2 &=p\cdot q
+ \end{aligned}\right\}
+ \begin{gathered}
+ \text{Satzgruppe}\\
+ \text{des Pythagoras}
+ \end{gathered}
+ \end{align*}
+\end{solution}
+
+\begin{exercise}
+ Geben Sie die Formel der \textbf{gleichförmigen Bewegung} wieder. Gehen Sie
+ davon aus, dass Sie 1000~Meter in
+ \SI[parse-numbers=false]{3\frac{1}{2}}{Minuten} laufen.
+ \begin{enumerate*}[label=\bfseries\alph*)]
+ \item Mit welcher Geschwindigkeit legen Sie die Strecke zurück?
+ \item Geben Sie die Geschwindigkeit in \si{\km\per\hour} an.
+ \end{enumerate*}
+ \textbf{Hinweis:} Nehmen Sie zur Berechnung die vereinfachte Form und gehen
+ Sie davon aus, dass Ihre Geschwindigkeit konstant ist.
+\end{exercise}
+\begin{solution}
+ \begin{align*}
+ s &=v\cdot t+s_0 \\
+ 1000 &=v\cdot 210 \\
+ v &=\frac{\SI{1000}{\m}}{\SI{210}{\second}} \\
+ v &=\SI{4.76}{\m\per\second} = \SI{17.1}{\km\per\hour}
+ \end{align*}
+\end{solution}
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf 2018-02-14 21:31:31 UTC (rev 46634)
Property changes on: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -0,0 +1,94 @@
+% http://golatex.de/viewtopic,p,91339.html
+\documentclass[18pt,a4paper]{article}
+\usepackage[utf8]{inputenc}
+\usepackage[ngerman]{babel}
+
+\usepackage{xsim,tcolorbox}
+\usepackage{amsmath}
+\xsimsetup{
+ exercise/within = section ,
+ exercise/the-counter = \thesection.\arabic{exercise} ,
+ print-solutions/headings-template=none
+}
+\SetExerciseParameters{exercise}{
+ exercise-template = mine ,
+ solution-template = mine
+}
+
+\DeclareExerciseEnvironmentTemplate{mine}
+ {%
+ \tcolorbox[
+ % colors:
+ colback = white , colframe = black , coltitle = black ,
+ % rules:
+ boxrule = 0pt , toprule = 1pt , bottomrule = 1pt , arc = 0pt ,
+ % spacing:
+ boxsep = 0pt , left = 0pt , right = 0pt ,
+ % title:
+ detach title , before upper = \tcbtitle\par\noindent ,
+ fonttitle = \bfseries ,
+ title = \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}
+ ]
+ }
+ {\endtcolorbox}
+
+\DeclareExerciseTranslation{German}{exercise}{Aufgabe}
+\DeclareExerciseTagging{difficulty}
+
+\begin{document}
+
+\section{Wellenausbreitung im Vakuum und in Materie}
+\subsection{Maxwellsche Gleichungen}
+
+\begin{align*}
+ \nabla \cdot \vec{E}\left(\vec{r}, t \right) =
+ \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0}
+\end{align*}
+
+\begin{exercise}[difficulty=easy]
+Something stupid
+\end{exercise}
+\begin{solution}
+Here is a nonstupid solution for your problem
+\end{solution}
+
+\subsection{Empirischer Zugang zu Wellengleichungen}
+
+\begin{exercise}[difficulty=hard]
+Eine weitere Aufgabe
+\end{exercise}
+\begin{solution}
+Solution Number 2
+\end{solution}
+
+\subsection*{Lösungen}
+\printsolutions[section,difficulty=hard]
+
+\section{Wellenausbreitung im Vakuum und in Materie}
+\subsection{Maxwellsche Gleichungen}
+
+\begin{align*}
+ \nabla \cdot \vec{E}\left(\vec{r}, t \right) =
+ \frac{\varrho\left(\vec{r}, t \right)}{\varepsilon_0}
+\end{align*}
+
+\begin{exercise}[difficulty=easy]
+Something stupid
+\end{exercise}
+\begin{solution}
+Here is a nonstupid solution for your problem
+\end{solution}
+
+\subsection{Empirischer Zugang zu Wellengleichungen}
+
+\begin{exercise}[difficulty=hard]
+Eine weitere Aufgabe
+\end{exercise}
+\begin{solution}
+Solution Number 2
+\end{solution}
+
+\subsection*{Lösungen}
+\printsolutions[section]
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -21,7 +21,7 @@
\end{description}
}
-\newcommand\hint[1]{\SetExerciseProperty{\ExerciseType}{\ExerciseID}{hint}{#1}}
+\newcommand\hint[1]{\SetExerciseProperty{hint}{#1}}
\begin{document}
Modified: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-391530.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -1,3 +1,4 @@
+% https://tex.stackexchange.com/q/391530
\documentclass{article}
\usepackage{xsim}
Added: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf 2018-02-14 21:31:31 UTC (rev 46634)
Property changes on: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -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}
Property changes on: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/xsim/xsim.history
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/xsim.history 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/xsim.history 2018-02-14 21:31:31 UTC (rev 46634)
@@ -7,7 +7,7 @@
Web: https://github.com/cgnieder/xsim
E-Mail: contact at 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 @@
- 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
Modified: trunk/Master/texmf-dist/doc/latex/xsim/xsim.ideas
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/xsim.ideas 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/xsim.ideas 2018-02-14 21:31:31 UTC (rev 46634)
@@ -7,7 +7,7 @@
Web: https://github.com/cgnieder/xsim
E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -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 at 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 @@
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 @@
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,19 +258,19 @@
\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}
Arguably one downside of the approach using external files for each exercise
@@ -288,10 +288,10 @@
\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 @@
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 @@
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 @@
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 @@
\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 @@
\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 @@
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 @@
\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 @@
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 @@
\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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim-manual.cls 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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 at example@links [1] {
+ \href { \xsim at example@texfile at path {#1} } { \color{white} [\TeX] } ~
+ \href { \xsim at example@pdffile at 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 at add@example[1]{%
@@ -695,8 +734,7 @@
sidebyside gap=0pt,
lower separated=false,
title=Example~\theexamplefile\ \enquote{\texttt{##1}}
- \href{\xsim at example@texfile at path{##1}}{\color{white}[\TeX]}
- \href{\xsim at example@pdffile at path{##1}}{\color{white}[PDF]}%
+ \xsim at example@links{##1}%
]
\bookmark[level=2,dest=examplefile.\arabic{examplefile}]{Example~\theexamplefile\ (##1)}%
\lstinputlisting[style=cnltx,lastline=10]{\xsim at example@texfile at path{##1}}
@@ -739,10 +777,11 @@
\xsim at add@example{texsx-369803}
\xsim at add@example{texsx-370642}
\xsim at add@example{texsx-391530}
+\xsim at add@example{texsx-395273}
\xsim at add@example{texwelt-6698}
\xsim at add@example{texwelt-15093}
-\xsim at add@example{golatex-16824}
-\xsim at add@example{golatex-18844}
+\xsim at add@example{golatex-80640}
+\xsim at add@example{golatex-91339}
% ----------------------------------------------------------------------------
@@ -771,11 +810,13 @@
\xsim at add@layout{runin}[\renewcommand*\theexercise{\arabic{exercise}.}]
\xsim at add@layout{margin}[\renewcommand*\theexercise{\arabic{exercise}.}]
-\xsim at add@version{0.8} {2017-05-18}
-\xsim at add@version{0.8a} {2017-05-19}
-\xsim at add@version{0.8b} {2017-05-23}
-\xsim at add@version{0.9} {2017-06-20}
-\xsim at add@version{0.10} {2017-09-19}
+\xsim at add@version{0.8} {2017-05-18}
+\xsim at add@version{0.8a} {2017-05-19}
+\xsim at add@version{0.8b} {2017-05-23}
+\xsim at add@version{0.9} {2017-06-20}
+\xsim at add@version{0.10} {2017-09-19}
+\xsim at add@version{0.10a} {2017-10-04}
+\xsim at add@version{0.11} {2018-02-12}
% ----------------------------------------------------------------------------
\endinput
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.auxfile.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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 } }
}
}
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.base.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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:
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.blanks.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.collections.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.definitions.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.environments.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.exercises.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.goals.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.grades.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.interface.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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] {}
Deleted: trunk/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.layouts.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -1,77 +0,0 @@
-% ----------------------------------------------------------------------------
-% the XSIM package - layouts style
-%
-% eXercise Sheets IMproved
-%
-% ----------------------------------------------------------------------------
-% Clemens Niederberger
-% Web: https://github.com/cgnieder/xsim
-% E-Mail: contact at mychemistry.eu
-% ----------------------------------------------------------------------------
-% Copyright 2017 Clemens Niederberger
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Clemens Niederberger.
-% ----------------------------------------------------------------------------
-% If you have any ideas, questions, suggestions or bugs to report, please
-% feel free to contact me.
-% ----------------------------------------------------------------------------
-\xsimstyle{layouts}[2017/09/14]
-
-\RequirePackage{needspace}
-
-\DeclareExerciseEnvironmentTemplate{runin}
- {%
- \par\vspace{\baselineskip}
- \Needspace*{2\baselineskip}
- \noindent
- \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
- \GetExercisePropertyT{subtitle}{ \textit{#1}} % <<< notice the space
- \IfInsideSolutionF{%
- \GetExercisePropertyT{points}{%
- \marginpar{%
- \printgoal{\PropertyValue}%
- \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
- \,\IfExerciseGoalSingularTF{points}
- {\XSIMtranslate{point}}
- {\XSIMtranslate{points}}%
- }%
- }%
- }%
- }
- {}
-
-\RequirePackage{array}
-
-\DeclareExerciseEnvironmentTemplate{margin}
- {%
- \trivlist
- \item[\llap{%
- \smash{%
- \tabular[t]{@{}r@{}}
- \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}
- \IfExercisePropertySetT{points}{%
- \tabularnewline
- (%
- \printgoal{\GetExerciseProperty{points}}%
- \GetExercisePropertyT{bonus-points}{+\printgoal{#1}}%
- \,\XSIMtranslate{point-abbr}%
- )%
- }%
- \endtabular
- }%
- }]\relax
- }
- {\endtrivlist}
-
-% ----------------------------------------------------------------------------
-\endinput
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.modules.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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,7 +198,7 @@
% style files
\NewDocumentCommand \xsimstyle {smO{}}
{
- \__xsim_module:nn {#2} {#3}
+ \__xsim_module:nn {style.#2} {#3}
\IfBooleanT {#1} { \ExplSyntaxOn }
}
@@ -205,7 +205,8 @@
\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:
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.properties.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.random.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.solutions.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.sty 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.sty 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Added: trunk/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -0,0 +1,77 @@
+% ----------------------------------------------------------------------------
+% the XSIM package - layouts style
+%
+% eXercise Sheets IMproved
+%
+% ----------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/xsim
+% E-Mail: contact at mychemistry.eu
+% ----------------------------------------------------------------------------
+% 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
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% ----------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% ----------------------------------------------------------------------------
+\xsimstyle{layouts}[2017/09/14]
+
+\RequirePackage{needspace}
+
+\DeclareExerciseEnvironmentTemplate{runin}
+ {%
+ \par\vspace{\baselineskip}
+ \Needspace*{2\baselineskip}
+ \noindent
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}%
+ \GetExercisePropertyT{subtitle}{ \textit{#1}} % <<< notice the space
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{points}{%
+ \marginpar{%
+ \printgoal{\PropertyValue}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{\PropertyValue}}%
+ \,\IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ }
+ {}
+
+\RequirePackage{array}
+
+\DeclareExerciseEnvironmentTemplate{margin}
+ {%
+ \trivlist
+ \item[\llap{%
+ \smash{%
+ \tabular[t]{@{}r@{}}
+ \textbf{\XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}}
+ \IfExercisePropertySetT{points}{%
+ \tabularnewline
+ (%
+ \printgoal{\GetExerciseProperty{points}}%
+ \GetExercisePropertyT{bonus-points}{+\printgoal{#1}}%
+ \,\XSIMtranslate{point-abbr}%
+ )%
+ }%
+ \endtabular
+ }%
+ }]\relax
+ }
+ {\endtrivlist}
+
+% ----------------------------------------------------------------------------
+\endinput
Property changes on: trunk/Master/texmf-dist/tex/latex/xsim/xsim.style.layouts.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.tags.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.templates.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.translations.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsim.verbwrite.code.tex 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
Modified: trunk/Master/texmf-dist/tex/latex/xsim/xsimverb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsim/xsimverb.sty 2018-02-14 14:44:38 UTC (rev 46633)
+++ trunk/Master/texmf-dist/tex/latex/xsim/xsimverb.sty 2018-02-14 21:31:31 UTC (rev 46634)
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact at 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
More information about the tex-live-commits
mailing list