summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/xsim
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-10 22:07:28 +0000
committerKarl Berry <karl@freefriends.org>2019-11-10 22:07:28 +0000
commite3210b55f95f0078fe35f60e19af205873f7e8b0 (patch)
tree7b098d15283b91276ec84ed29267ee1655c96497 /Master/texmf-dist/doc/latex/xsim
parent36dbb51507ef6c990eab86aa90f6dc4a0a0ebfd2 (diff)
xsim (10nov19)
git-svn-id: svn://tug.org/texlive/trunk@52725 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/xsim')
-rw-r--r--Master/texmf-dist/doc/latex/xsim/README3
-rw-r--r--Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.pdfbin0 -> 42513 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.tex75
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim.history3
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim_manual.pdfbin1229505 -> 1232911 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xsim/xsim_manual.tex24
6 files changed, 101 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/xsim/README b/Master/texmf-dist/doc/latex/xsim/README
index 68012b839a4..0aa35c006f7 100644
--- a/Master/texmf-dist/doc/latex/xsim/README
+++ b/Master/texmf-dist/doc/latex/xsim/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-XSIM 2019/11/02 v0.15
+XSIM 2019/11/10 v0.16
eXercise Sheets IMproved
@@ -83,6 +83,7 @@ The xsim package consists of the example files:
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.texsx-498299.tex, xsim.texsx-498299.pdf,
xsim.texwelt-6698.tex, xsim.texwelt-6698.pdf
xsim.texwelt-15093.tex, xsim.texwelt-15093.pdf
xsim.texwelt-23968.tex, xsim.texwelt-23968.pdf
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.pdf b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.pdf
new file mode 100644
index 00000000000..99e8314406f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.tex b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.tex
new file mode 100644
index 00000000000..6716d52e7e7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xsim/examples/xsim.texsx-498299.tex
@@ -0,0 +1,75 @@
+\documentclass{article}
+\usepackage[no-files]{xsim}
+\usepackage{tasks}
+
+\DeclareExerciseEnvironmentTemplate{item}
+ {\item[\GetExerciseProperty{counter}]}
+ {}
+
+\DeclareExerciseProperty{answer}
+
+\newcommand*\answer[1]{%
+ \XSIMexpandcode{%
+ \SetExerciseProperty{answer}
+ { (\noexpand\textit{\alph{task}}) \unexpanded{#1}}}%
+ #1%
+}
+
+\newcommand*\getanswers{%
+ \def\betweenanswers{\def\betweenanswers{\hspace{2em}}}%
+ \ForEachUsedExerciseByID{%
+ \betweenanswers##3\ExercisePropertyGet{##1}{##2}{answer}%
+ }%
+}
+
+\xsimsetup{
+ exercise/template = item,
+ exercise/the-counter = \arabic{exercise}.
+}
+
+\NewTasksEnvironment[
+ label = (\textit{\alph*}) ,
+ label-width = 14pt
+]{choice}[\choice]
+
+\newenvironment{questions}
+ {\itemize}
+ {\enditemize}
+
+\begin{document}
+
+\section{Problems}
+\begin{questions}
+ \begin{exercise}
+ What is the product of $-2$ and $3$?
+ \begin{choice}(4)
+ \choice \answer{$-6$}
+ \choice $6$
+ \choice $5$
+ \choice $-5$
+ \end{choice}
+ \end{exercise}
+ \begin{exercise}
+ What is the sum of the sides of a polygon called?
+ \begin{choice}(2)
+ \choice Leg
+ \choice \answer{Perimeter}
+ \choice Area
+ \choice Volume
+ \end{choice}
+ \end{exercise}
+ \begin{exercise}
+ What is the sum of $-2$ and $-3$?
+ \begin{choice}(4)
+ \choice $-6$
+ \choice $6$
+ \choice $5$
+ \choice \answer{$-5$}
+ \end{choice}
+ \end{exercise}
+\end{questions}
+
+\section{Answers}
+\getanswers
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim.history b/Master/texmf-dist/doc/latex/xsim/xsim.history
index c9e96232203..c3214cf5735 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim.history
+++ b/Master/texmf-dist/doc/latex/xsim/xsim.history
@@ -131,3 +131,6 @@ HISTORY:
option
v0.15 2019/11/02 - use own auxiliary file per default and add option
`use-aux'
+ v0.16 2019/11/10 - fix issue due to usage of own auxiliary file
+ - \XSIMatbegindocument and \XSIMatenddocument
+ - \xprintexercise, \xprintsolution, \xsimprint, \xsimxprint
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
index fc6659b04fc..72711292c54 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
+++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
index 7296f6124d8..5156221b0e6 100644
--- a/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
+++ b/Master/texmf-dist/doc/latex/xsim/xsim_manual.tex
@@ -911,6 +911,9 @@ existing exercise, \ie, every exercise whose external file exists.
\command{printexercise}[\marg{type}\marg{id}]
Inserts the exercise of type \meta{type} with the \property{id}
\meta{id}.
+ \command{xprintexercise}[\marg{type}\marg{id}]
+ \sinceversion{0.16}The same as \cs{printexercise} but expands \meta{type}
+ and \meta{id} before it uses them.
\end{commands}
\begin{example}
\printexercise{exercise}{5}
@@ -1135,6 +1138,9 @@ There are different commands for printing the solutions to exercises:
\command{printsolution}[\oarg{options}\marg{type}\marg{id}]
Prints the solution of the exercise of type \meta{type} with the
\property{id} \meta{id}.
+ \command{xprintsolution}[\marg{type}\marg{id}]
+ \sinceversion{0.16}The same as \cs{printsolution} but expands \meta{type}
+ and \meta{id} before it uses them.
\end{commands}
\begin{example}
@@ -1509,7 +1515,7 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate
\item \code{\#5}: the \property{points} property of the exercise
\item \code{\#6}: the \property{bonus-points} property of the exercise
\end{itemize}
- \command{ForEachPrintedExerciseByID}
+ \command{ForEachPrintedExerciseByID}[\marg{code}]
Loops over each \emph{printed} exercise order by the exercise id. Inside
\meta{code} you can refer to several properties of the corresponding
exercise:
@@ -1521,7 +1527,7 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate
\item \code{\#5}: the \property{points} property of the exercise
\item \code{\#6}: the \property{bonus-points} property of the exercise
\end{itemize}
- \command{ForEachUsedExerciseByID}
+ \command{ForEachUsedExerciseByID}[\marg{code}]
Loops over each \emph{used} exercise order by the exercise id. Inside
\meta{code} you can refer to several properties of the corresponding
exercise:
@@ -1533,6 +1539,12 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate
\item \code{\#5}: the \property{points} property of the exercise
\item \code{\#6}: the \property{bonus-points} property of the exercise
\end{itemize}
+ \command{XSIMprint}[\Marg{exercise|solution}\marg{type}\marg{id}]
+ \sinceversion{0.16}Inserts the either the exercise or the solution of type
+ \meta{type} with the \property{id} \meta{id}.
+ \command{XSIMxprint}[\Marg{exercise|solution}\marg{type}\marg{id}]
+ \sinceversion{0.16}The same as \cs{XSIMprint} but expands \meta{type} and
+ \meta{id} before it uses them.
\expandable\command{XSIMtranslate}[\marg{keyword}]
Delivers the translation of \meta{keyword} according to the current
document language (in the meaning of a \pkg{babel}~\cite{pkg:babel} or
@@ -1562,7 +1574,13 @@ yourself in order to achieve certain layouts\footnote{I plan to incorporate
\meta{code 2} is the same tokenlist.
\expandable\command{XSIMifblank\TF}[\marg{code}\marg{true}\marg{false}]
Checks if the full expansion\footref{fn:romannumeral} of \meta{code} is
- blank (\ie, if it is empty or only consists of spaces).
+ blank (\ie, if it is empty or only consists of spaces).
+ \command{XSIMatbegindocument}[\marg{code}]
+ \sinceversion{0.15a}Adds \meta{code} to \xsim's begin document hook.
+ Should be used inside style files instead of \cs*{AtBeginDocument}.
+ \command{XSIMatenddocument}[\marg{code}]
+ \sinceversion{0.15a}Adds \meta{code} to \xsim's end document hook.
+ Should be used inside style files instead of \cs*{AtEndDocument}.
\end{commands}
\subsection{Declaring Templates}