From 5dc958d03508be1e48423296a0b88d973ccd2d74 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 14 Feb 2018 21:31:31 +0000 Subject: xsim (14feb18) git-svn-id: svn://tug.org/texlive/trunk@46634 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/xsim/README | 5 +- .../doc/latex/xsim/examples/xsim.golatex-16824.pdf | Bin 46308 -> 0 bytes .../doc/latex/xsim/examples/xsim.golatex-16824.tex | 131 --------------------- .../doc/latex/xsim/examples/xsim.golatex-18844.pdf | Bin 65379 -> 0 bytes .../doc/latex/xsim/examples/xsim.golatex-18844.tex | 94 --------------- .../doc/latex/xsim/examples/xsim.golatex-80640.pdf | Bin 0 -> 46308 bytes .../doc/latex/xsim/examples/xsim.golatex-80640.tex | 131 +++++++++++++++++++++ .../doc/latex/xsim/examples/xsim.golatex-91339.pdf | Bin 0 -> 65379 bytes .../doc/latex/xsim/examples/xsim.golatex-91339.tex | 94 +++++++++++++++ .../doc/latex/xsim/examples/xsim.hints.pdf | Bin 45719 -> 45719 bytes .../doc/latex/xsim/examples/xsim.hints.tex | 2 +- .../doc/latex/xsim/examples/xsim.texsx-391530.tex | 1 + .../doc/latex/xsim/examples/xsim.texsx-395273.pdf | Bin 0 -> 50580 bytes .../doc/latex/xsim/examples/xsim.texsx-395273.tex | 74 ++++++++++++ .../doc/latex/xsim/examples/xsim.various.pdf | Bin 86185 -> 86646 bytes Master/texmf-dist/doc/latex/xsim/xsim.history | 14 ++- Master/texmf-dist/doc/latex/xsim/xsim.ideas | 2 +- Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf | Bin 1151692 -> 1163299 bytes Master/texmf-dist/doc/latex/xsim/xsim_manual.tex | 100 +++++++++++----- 19 files changed, 386 insertions(+), 262 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf delete mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex delete mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf delete mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex create mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf create mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex create mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf create mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex create mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf create mode 100644 Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.tex (limited to 'Master/texmf-dist/doc/latex') 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-16824.pdf deleted file mode 100644 index 76cf1617cbd..00000000000 Binary files a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex deleted file mode 100644 index 3a324d4221f..00000000000 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-16824.tex +++ /dev/null @@ -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} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf deleted file mode 100644 index 97cb4659e06..00000000000 Binary files a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex deleted file mode 100644 index aa49dd64e1b..00000000000 --- a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-18844.tex +++ /dev/null @@ -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} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf new file mode 100644 index 00000000000..76cf1617cbd Binary files /dev/null and b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.pdf differ diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex new file mode 100644 index 00000000000..5ccdff63a45 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-80640.tex @@ -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} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf new file mode 100644 index 00000000000..97cb4659e06 Binary files /dev/null and b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.pdf differ diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex new file mode 100644 index 00000000000..8ae03971c56 --- /dev/null +++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.golatex-91339.tex @@ -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} diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf index 6a6dab99cca..a34fbd8f79c 100644 Binary files a/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf and b/Master/texmf-dist/doc/latex/xsim/examples/xsim.hints.pdf differ 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 new file mode 100644 index 00000000000..c3796c8ee0c Binary files /dev/null and b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-395273.pdf differ 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 index b8f033c7599..d0406e830ce 100644 Binary files a/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf and b/Master/texmf-dist/doc/latex/xsim/examples/xsim.various.pdf differ 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__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 index e38a1654029..2cc93eb00b0 100644 Binary files a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf and b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf differ 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 -- cgit v1.2.3