summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/README4
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdfbin673470 -> 678239 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex309
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl87
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl87
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl87
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl87
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets.sty738
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def7
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/translations.sty9
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
11 files changed, 972 insertions, 444 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README
index a493117fefd..180c9f30362 100644
--- a/Master/texmf-dist/doc/latex/exsheets/README
+++ b/Master/texmf-dist/doc/latex/exsheets/README
@@ -1,10 +1,10 @@
--------------------------------------------------------------------------
-EXSHEETS v0.7b - 2013/02/17
+EXSHEETS v0.8 - 2013/03/10
bundled packages:
the EXSHEETS package
Yet another package for the creation of exercise sheets
-the TRANSLATIONS package v0.6
+the TRANSLATIONS package v0.8
a simple translator
the CNTFORMATS package v0.4
A different way to read counters.
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
index 469aa546192..6cdfb667e84 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
index e5e9ce18ae7..82ecb068e62 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
@@ -96,14 +96,15 @@
acs, addpoints,
blank, bigstar, bottomrule,
checkedchoicebox, choice, choicebox, citetitle, cmd, color, correct,
- DeclareInstance, DeclareTemplateInterface, DeclareQuestionProperty,
- DebugExSheets,
- endspacing, examspace, ForEachQuestion, GetQuestionProperty, grade,
- includequestions, iflastquestion, lastvariant, midrule, NewQuSolPair,
- numberofquestions,
+ DebugExSheets, DeclareInstance, DeclareQuestionClass, DeclareQuestionProperty,
+ DeclareTemplateInterface,
+ endspacing, examspace, ForEachQuestion,
+ GetQuestionProperty, grade,
+ includequestions, iflastquestion,
+ lastvariant, midrule, NewQuSolPair, numberofquestions,
points, PrintIfIncludeActiveF, PrintIfIncludeActiveT, PrintIfIncludeActiveTF,
printsolutions, PrintSolutionsF, PrintSolutionsTF, PrintSolutionsT,
- QuestionNumber, RenewQuSolPair, rightarrow,
+ questionsincludedlast, QuestionNumber, RenewQuSolPair, rightarrow,
s, sample, setlength, SetQuestionProperties, SetupExSheets, SetVariations,
spacing, square, sumpoints,
tabcolsep, textcite, textcolor, toprule, totalpoints,
@@ -114,8 +115,8 @@
\newcommand*\translations{{\scshape\textcolor{main}{translations}}\xspace}
\addcmds{
cuisine,
- DeclareLanguage, DeclareLanguageAlias, DeclareLanguageDialect,
- DeclareTranslation,
+ DeclareDictTranslation, DeclareLanguage, DeclareLanguageAlias,
+ DeclareLanguageDialect, DeclareTranslation,
GetTranslation, GetTranslationFor,
kitchen,
LoadDictionary, LoadDictionaryFor,
@@ -227,6 +228,7 @@
% ----------------------------------------------------------------------------
% example definitions that have to be done in the preamble:
+\DeclareQuestionClass{difficulty}{difficulties}
\DeclareQuestionProperty{notes}
\DeclareQuestionProperty{reference}
\DeclareQuestionProperty{topic}
@@ -310,14 +312,14 @@
\TitlePicture{%
\parbox{.8\linewidth}{%
\ExSheets provides means to create exercises or questions and their
- corresponding solutions. The questions can be divided into classes and/or
- topics and can be printed selectively. Meta-data to questions can be added
- and recovered.\par
- The solutions may be printed where they are, can be collected and printed at
- a later point in the document alltogether or section-wise or selectively by
- \acs{id}.\par
- \ExSheets provides a comprehensive interface for styling the headings of
- questions and solutions.}}
+ corresponding solutions. The questions can be divided into classes and can
+ be printed selectively. Meta-data to questions can be added and recovered.
+ \par
+ The solutions may be printed where they are, can be collected and printed at
+ a later point in the document alltogether or section-wise or selectively by
+ \acs{id}.\par
+ \ExSheets provides a comprehensive interface for styling the headings of
+ questions and solutions.}}
\begin{document}
@@ -382,6 +384,9 @@ described in part~\ref{part:translations} and \cntformats in part~\ref{part:cntf
These packages provide functionality that is used by \ExSheets. They can, however,
be used independently from \ExSheets.
+The packages \translations and \cntformats both aren't really useful on a
+user-level but maybe for package writers.
+
\section{Installation}\secidx[Installation]{Preliminary}
If you install \ExSheets manually beware to put the files
\begin{itemize}
@@ -616,10 +621,10 @@ The \code{question} environment takes one or more of the following options:
The difference between \key{print} and \key{use} lies behind the scenes: with
\key{print}{false} the question is not printed, but it still gets an individual
-ID, is numbered, and a possible solution is saved. This is for example useful
+\ac{id}, is numbered, and a possible solution is saved. This is for example useful
when you want to print a sample solution for an exam. With \key{use}{false} it
-is fully discarded which means it is not accessible through an \acs{id} and a possible
-solution will not be saved.
+is fully discarded which means it is not accessible through an \acs{id} and a
+possible solution will not be saved.
\secidx*{questions}
\subsection{The \code{solution} Environment}\secidx{solutions}
@@ -959,13 +964,13 @@ is as follows:
Please be aware that the labels must be processed in a previous \LaTeX\ run before
\cmd{S} and \cmd{C} can pass them on to \cmd{printsolutions}.
-\subsection{Print by \texorpdfstring{\acs{id}}{ID}}\label{ssec:ids}\secidx[print!by ID]{solutions}
+\subsection{Print by \acs{id}}\label{ssec:ids}\secidx[print!by ID]{solutions}
Now comes the best part: you can also print selected solutions! Every question
has an \acs{id}. To see which \acs{id} a question has you can call the following
command:
\begin{beschreibung}
\Befehl{DebugExSheets}{true|false}
- \Befehl{CurrentQuestionID}\sinceversion{0.4a}\newline
+ \Befehl{CurrentQuestionID}\newline\sinceversion{0.4a}%
expands to the current question \acs{id} (after two expansions).
\end{beschreibung}
Let's create some more questions and take a look what this command does:
@@ -1000,7 +1005,9 @@ order given you can use the option
Sort solutions given by \acs{id} or don't.
\end{beschreibung}
-\section{Using Classes}\label{sec:classes}\secidx{Classes}
+\section{Dividing Questions into Classes}\label{sec:dividing-concepts}
+\subsection{Using Classes}\label{sec:classes}\secidx{Classes}
+\secidx[Classes]{Dividing Concepts}
For creating different variants of a written exam or different difficulty levels
of an exercise sheet it comes in handy if one can assign certain classes to questions
and then tell \ExSheets only to use one ore more specific classes.
@@ -1010,15 +1017,15 @@ and then tell \ExSheets only to use one ore more specific classes.
are printed and have their solutions saved.
\end{beschreibung}
\begin{beispiel}
- \SetupExSheets{use-classes={easy,hard}}
- \begin{question}[class=easy]
- This one's easy.
+ \SetupExSheets{use-classes={A,C}}
+ \begin{question}[class=A]
+ Belonging to class A.
\end{question}
- \begin{question}[class=middle]
- This one's a little bit harder.
+ \begin{question}[class=B]
+ Belonging to class B.
\end{question}
- \begin{question}[class=hard]
- Let's see if you can solve this one!
+ \begin{question}[class=C]
+ Belonging to class C!
\end{question}
\end{beispiel}
Questions of classes that are not used are fully discarded. \emph{This also means
@@ -1028,7 +1035,8 @@ that questions that don't have a class assigned are discarded.}
\bool_set_false:N \g__exsheets_use_classes_bool
\ExplSyntaxOff
-\section{Using Topics}\label{sec:topics}\secidx{Topics}
+\subsection{Using Topics}\label{sec:topics}\secidx{Topics}
+\secidx[Topics]{Dividing Concepts}
Similarly to classes one can assign topics to questions. The usage is practically
identical, the semantic meaning is different.
\begin{beschreibung}
@@ -1058,90 +1066,45 @@ supported yet.
\bool_set_false:N \g__exsheets_use_topics_bool
\ExplSyntaxOff
-\section{Variations of an Exam}\secidx{Variations}
-\noindent\sinceversion{0.6}It is a quite common task to design an exam in two
-different variants. This is of course possible with \ExSheets' classes (see
-section~\ref{sec:classes}). However, often not the whole question is to be
-different but only small details, the numbers in a maths exam, say. For this
-purpose \ExSheets provides the following commands:
+\subsection{Own Dividing Concepts}\secidx{Dividing Concepts}
+\noindent\sinceversion{0.8}Actually both classes and topics are introduced into
+\ExSheets internally this way:
+\begin{beispiel}[code only]
+ \DeclareQuestionClass{class}{classes}
+ \DeclareQuestionClass{topic}{topics}
+\end{beispiel}
+which means you can do the same introducing your own dividing concepts.
\begin{beschreibung}
- \Befehl{SetVariations}{<num>}\newline
- Set the number of different variants. This will determine how many arguments
- the command \cmd*{vary} will get. \code{<num>} must at least be \code{2} and
- is initially set to \code{2}.
- \Befehl{variant}{<num>}\newline
- Choose the active variant. The argument must be a number between \code{1}
- and the number set with \cmd*{SetVariations}. Initially set to \code{1}.
- \Befehl{vary}{<variant 1>}\ma{<variant 2>}\newline
- This command is the one actually used in the document. It has a number of
- required arguments equal to the number set with \cmd*{SetVariations}. All of
- its arguments are discarded except the one specified with \cmd*{variant}.
- \Befehl{lastvariant}\newline% TODO: richtige version einfügen!
- \sinceversion{0.7b}Each time \cmd{vary} is called it stores the value it
- chose in \cmd{lastversion}. This might be convenient to use if one
- otherwise would have to repeatedly write the same \cmd{vary}.
+ \Befehl{DeclareQuestionClass}{<singular name>}\ma{<plural name>}\newline
+ Introduces a new dividing concept and defines both new options for the
+ \code{question} environment and new global options.
\end{beschreibung}
-\begin{beispiel}
- \SetVariations{6}%
- \variant{6}\vary{A}{B}{C}{D}{E}{F}
- (last variant: \lastvariant)
- \variant{1}\vary{A}{B}{C}{D}{E}{F}
- (last variant: \lastvariant)
- \variant{5}\vary{A}{B}{C}{D}{E}{F}
- (last variant: \lastvariant)
- \variant{2}\vary{A}{B}{C}{D}{E}{F}
- (last variant: \lastvariant)
- \variant{4}\vary{A}{B}{C}{D}{E}{F}
- (last variant: \lastvariant)
- \variant{3}\vary{A}{B}{C}{D}{E}{F}
- (last variant: \lastvariant)
+For example you could decide you want to group your questions according to their
+difficulty. You could place the following line in your preamble:
+\begin{beispiel}[code only]
+ \DeclareQuestionSubdivision{difficulty}{difficulties}
\end{beispiel}
-\secidx*{Variations}
-
-\section{A Grade Distribution}\secidx{Grade Distribution}
-Probably this is a rather esoteric feature but it could proof useful in some cases.
-Suppose you are a German math teacher and want to grade exactly corresponding to
-the number of points relative to the sum of total points, regardless of how big
-that might be. You could do something like this to present your grading decisions
-for the exam:
+This would define an option \key{use-difficulties} analogous to \key{use-classes}
+and \key{use-topics}. It would also define an option \key{difficulty} for the
+\code{question} environment. This means you could now do something like the
+following:
\begin{beispiel}
- % preamble:
- % \DeclareRelGrades{
- % 1 = 1 ,
- % {1,5} = .9167 ,
- % 2 = .8333 ,
- % {2,5} = .75 ,
- % 3 = .6667 ,
- % {3,5} = .5833 ,
- % 4 = .5
- % }
- \small\setlength\tabcolsep{2pt}
- \begin{tabular}{r|*8c}
- Punkte
- & $\grade*{1}$ & $\le\grade*{1}$ & $\le\grade*{1,5}$ & $\le\grade*{2}$
- & $\le\grade*{2,5}$ & $\le\grade*{3}$ & $\le\grade*{3,5}$ & $<\grade*{4}$ \\
- Note
- & 1 & 1--2 & 2 & 2--3 & 3 & 3--4 & 4 & 5
- \end{tabular}
+ \SetupExSheets{use-difficulties={easy,hard}}
+ \begin{question}[difficulty=easy]
+ An easy question.
+ \end{question}
+ \begin{question}[difficulty=medium]
+ This one's a bit harder.
+ \end{question}
+ \begin{question}[difficulty=hard]
+ Now let's see if you can solve this one.
+ \end{question}
\end{beispiel}
-
-These are the available commands and options:
-\begin{beschreibung}
- \Befehl{DeclareRelGrades}{<grade>=<num>,...}\newline
- This command is used to define grades and assign the percentage of total
- points to them.
- \Befehl{grade}*{<grade>}\newline
- Gives the number of points corresponding to a grade depending on the value
- of \cmd{pointssum} with or without (starred version) ``unit''.
- \Option[grades]{round}{<num>}\Default{0}
- The number of decimals the points of a grade are rounded to. This doesn't apply
- to the maximum number of points if the rounded number would be bigger than the
- actual sum.
- \Option[grades]{half}{\default{true}|false}\Default{false}
- If set to \code{true} points are rounded either to full or to half points.
-\end{beschreibung}
-\secidx*{Grade Distribution}
+\secidx*{Dividing Concepts}
+\ExplSyntaxOn
+ \bool_set_false:N \g__exsheets_use_difficulties_bool
+\ExplSyntaxOff
\section{Adding and Using Additional Information to Questions}\label{sec:additional_info}
\secidx{Additional Information to Questions}
@@ -1228,6 +1191,10 @@ It is now possible to recover these values later:
\code{ref} and \code{pageref} are predefined which will call the corresponding
\cmd*{ref} or \cmd*{pageref}, respectively.
+Please note that these properties \emph{are not the same} as the dividing
+concepts explained in section~\ref{sec:dividing-concepts} although they may
+seem similar in meaning or even have the same name.
+
\sinceversion{0.3}There are additional commands that might prove useful:
\begin{beschreibung}
\Befehl{ForEachQuestion}{<code to be executed for each used question>}\newline
@@ -1269,6 +1236,91 @@ For four questions the table now would look similar to figure~\ref{fig:grading-t
\end{figure}
\secidx*{Additional Information to Questions}
+\section{Variations of an Exam}\secidx{Variations}
+\noindent\sinceversion{0.6}It is a quite common task to design an exam in two
+different variants. This is of course possible with \ExSheets' classes (see
+section~\ref{sec:classes}). However, often not the whole question is to be
+different but only small details, the numbers in a maths exam, say. For this
+purpose \ExSheets provides the following commands:
+\begin{beschreibung}
+ \Befehl{SetVariations}{<num>}\newline
+ Set the number of different variants. This will determine how many arguments
+ the command \cmd*{vary} will get. \code{<num>} must at least be \code{2} and
+ is initially set to \code{2}.
+ \Befehl{variant}{<num>}\newline
+ Choose the active variant. The argument must be a number between \code{1}
+ and the number set with \cmd*{SetVariations}. Initially set to \code{1}.
+ \Befehl{vary}{<variant 1>}\ma{<variant 2>}\newline
+ This command is the one actually used in the document. It has a number of
+ required arguments equal to the number set with \cmd*{SetVariations}. All of
+ its arguments are discarded except the one specified with \cmd*{variant}.
+ \Befehl{lastvariant}\newline% TODO: richtige version einfügen!
+ \sinceversion{0.7b}Each time \cmd{vary} is called it stores the value it
+ chose in \cmd{lastversion}. This might be convenient to use if one
+ otherwise would have to repeatedly write the same \cmd{vary}.
+\end{beschreibung}
+
+\begin{beispiel}
+ \SetVariations{6}%
+ \variant{6}\vary{A}{B}{C}{D}{E}{F}
+ (last variant: \lastvariant)
+ \variant{1}\vary{A}{B}{C}{D}{E}{F}
+ (last variant: \lastvariant)
+ \variant{5}\vary{A}{B}{C}{D}{E}{F}
+ (last variant: \lastvariant)
+ \variant{2}\vary{A}{B}{C}{D}{E}{F}
+ (last variant: \lastvariant)
+ \variant{4}\vary{A}{B}{C}{D}{E}{F}
+ (last variant: \lastvariant)
+ \variant{3}\vary{A}{B}{C}{D}{E}{F}
+ (last variant: \lastvariant)
+\end{beispiel}
+\secidx*{Variations}
+
+\section{A Grade Distribution}\secidx{Grade Distribution}
+Probably this is a rather esoteric feature but it could proof useful in some cases.
+Suppose you are a German math teacher and want to grade exactly corresponding to
+the number of points relative to the sum of total points, regardless of how big
+that might be. You could do something like this to present your grading decisions
+for the exam:
+\begin{beispiel}
+ % preamble:
+ % \DeclareRelGrades{
+ % 1 = 1 ,
+ % {1,5} = .9167 ,
+ % 2 = .8333 ,
+ % {2,5} = .75 ,
+ % 3 = .6667 ,
+ % {3,5} = .5833 ,
+ % 4 = .5
+ % }
+ \small\setlength\tabcolsep{2pt}
+ \begin{tabular}{r|*8c}
+ Punkte
+ & $\grade*{1}$ & $\le\grade*{1}$ & $\le\grade*{1,5}$ & $\le\grade*{2}$
+ & $\le\grade*{2,5}$ & $\le\grade*{3}$ & $\le\grade*{3,5}$ & $<\grade*{4}$ \\
+ Note
+ & 1 & 1--2 & 2 & 2--3 & 3 & 3--4 & 4 & 5
+ \end{tabular}
+\end{beispiel}
+
+These are the available commands and options:
+\begin{beschreibung}
+ \Befehl{DeclareRelGrades}{<grade>=<num>,...}\newline
+ This command is used to define grades and assign the percentage of total
+ points to them.
+ \Befehl{grade}*{<grade>}\newline
+ Gives the number of points corresponding to a grade depending on the value
+ of \cmd{pointssum} with or without (starred version) ``unit''.
+ \Option[grades]{round}{<num>}\Default{0}
+ The number of decimals the points of a grade are rounded to. This doesn't apply
+ to the maximum number of points if the rounded number would be bigger than the
+ actual sum.
+ \Option[grades]{half}{\default{true}|false}\Default{false}
+ If set to \code{true} points are rounded either to full or to half points.
+\end{beschreibung}
+\secidx*{Grade Distribution}
+
\section{Selectively Include Questions from External Files}\label{sec:include}
\secidx{Include from External Files}
Suppose you have one or more files with questions prepared to use them as a kind
@@ -1308,6 +1360,9 @@ are however the following options:
\Option[include]{random}{<num>}\Default{}
Includes \code{<num>} randomly selected questions. This option uses the
\paket{pgfcore} package to create the pseudo-random numbers.
+ \Option[include]{exclude}{<list of IDs>}\Default{}
+ Questions who's \acp{id} are specified here are \emph{not} included. This
+ option can be combined with the \key{random} option.
\end{beschreibung}
The usage should be self-explainable:
\begin{beispiel}[code only]
@@ -1319,19 +1374,26 @@ The usage should be self-explainable:
In order to be able to select the questions \ExSheets needs to \cmd{input} the
file twice. The first time the available questions are determined, the second time
the selected questions are used. This unfortunately means that anything that is
-\emph{not} part of a question or solution is also input twice. Either don't do
-that or use one of the following commands for control:
+\emph{not} part of a question or solution is also input twice. Either don't put
+anything else into the file or use one of the following commands for control:
\begin{beschreibung}
\Befehl{PrintIfIncludeActiveTF}\ma{<true code>}\ma{<false code>}
\Befehl{PrintIfIncludeActiveT}\ma{<true code>}
\Befehl{PrintIfIncludeActiveF}\ma{<false code>}
\end{beschreibung}
-If you use the \key{random} option you need to be aware of the following facts:
-the options \key{use-classes}, \key{use-topics} and \key{question/print} are not
-considered when selecting the questions which means you might end up with less
-questions included than you've specified. I'm still not sure this is a feature
-or a bug\ldots
+The selection can be refined further by selecting questions belonging to a
+specific class of questions (see section~\ref{sec:dividing-concepts}) before
+using \cmd{includequestions}.
+
+\sinceversion{0.8}After you've used \cmd{includequestions} the \acp{id} of the
+included questions is available as an unordered comma separated list in the
+following macro:
+\begin{beschreibung}
+ \Befehl{questionsincludedlast}\newline
+ Unordered comma separated list of question \acp{id} included with the last
+ usage of \cmd{includequestions}.
+\end{beschreibung}
\secidx*{Include from External Files}
\section{Own Question/Solution Pairs}
@@ -2035,7 +2097,7 @@ has been extracted into a package if its own, \Tasks.
The reason for the \code{tasks} environment is an unwritten agreement in German
maths textbooks (in (junior) high school, especially) to organize exercises in
columns counting horizontally rather than vertically. That is what \code{tasks}
-primarily is for. If you don't need this feature you better off using traditional
+primarily is for. If you don't need this feature you're better off using traditional
\LaTeX{} lists and the \paket{enumitem} package for customization.
\section{Requirements}\secidx[Requirements]{\Tasks}[tasks]
@@ -2081,7 +2143,7 @@ Some text before the list.
\end{tasks}
And also some text after it.
-The environment takes the optional argument \ma{<num of columns>} with which the
+The environment takes the optional argument \da{<num of columns>} with which the
number of columns used by the environment is specified.
\begin{beispiel}[code only]
\begin{tasks}(2)
@@ -2275,7 +2337,7 @@ The last example shows you two additional commands:
\end{beschreibung}
\section{Styling \Tasks}
-Equivalent to the styling of \ExSheets \Tasks uses \paket{xtemplate} to
+Equivalent to the styling of \ExSheets{} \Tasks uses \paket{xtemplate} to
declare additional instances for the lists.
\subsection{The \code{tasks} Object}\label{sec:tasks}\secidx{The `tasks' Object}
@@ -2387,6 +2449,7 @@ These are the commands provided by \translations:
specified language.
\Befehl{LoadDictionaryFor}{<lang>}\ma{<name>}\newline
Loads a file named \code{<name>-<lang>.trsl}.
+ \Befehl{DeclareDictTranslation}{<key>}\ma{<translation>}% TODO: beschreibung
\end{beschreibung}
Quite a number of languages already are defined, either directly or via an alias.
So, before you define a language you should take a look in \code{translations.sty}
@@ -2423,11 +2486,11 @@ There is also preliminary support for dialects:
A typical dictionary file should look as follows:
\begin{beispiel}[code only]
% this is file housing-german.trsl
- \ProvideDictionaryFor{german}{housing}[<version info>]
- \DeclareTranslation{German}{kitchen (housing)}{K\"uche}
- \DeclareTranslation{German}{bathroom (housing)}{Bad}
- \DeclareTranslation{German}{living room (housing)}{Wohnzimmer}
- \DeclareTranslation{German}{bedroom (housing)}{Schlafzimmer}
+ \ProvideDictionaryFor{German}{housing}[<version info>]
+ \DeclareDictTranslation{kitchen (housing)}{K\"uche}
+ \DeclareDictTranslation{bathroom (housing)}{Bad}
+ \DeclareDictTranslation{living room (housing)}{Wohnzimmer}
+ \DeclareDictTranslation{bedroom (housing)}{Schlafzimmer}
...
\endinput
\end{beispiel}
diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl
new file mode 100644
index 00000000000..47dbcbeb39a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-english.trsl
@@ -0,0 +1,87 @@
+\ProvideDictionaryFor{English}{translations-basic-dictionary}
+
+\DeclareDictTranslation{Abstract}{Abstract}
+\DeclareDictTranslation{Addresses}{Addresses}
+\DeclareDictTranslation{addresses}{addresses}
+\DeclareDictTranslation{Address}{Address}
+\DeclareDictTranslation{address}{address}
+\DeclareDictTranslation{and}{and}
+\DeclareDictTranslation{Appendix}{Appendix}
+\DeclareDictTranslation{Authors}{Authors}
+\DeclareDictTranslation{authors}{authors}
+\DeclareDictTranslation{Author}{Author}
+\DeclareDictTranslation{author}{author}
+\DeclareDictTranslation{Bibliography}{Bibliography}
+\DeclareDictTranslation{cc}{cc}
+\DeclareDictTranslation{Chapters}{Chapters}
+\DeclareDictTranslation{chapters}{chapters}
+\DeclareDictTranslation{Chapter}{Chapter}
+\DeclareDictTranslation{chapter}{chapter}
+\DeclareDictTranslation{Conclusion}{Conclusion}
+\DeclareDictTranslation{conclusion}{conclusion}
+\DeclareDictTranslation{Contents}{Contents}
+\DeclareDictTranslation{Continuation}{Continuation}
+\DeclareDictTranslation{continuation}{continuation}
+\DeclareDictTranslation{cont}{cont}
+\DeclareDictTranslation{encl (plural)}{encl}
+\DeclareDictTranslation{encl (singular)}{encl}
+\DeclareDictTranslation{encl}{encl}
+\DeclareDictTranslation{Figures}{Figures}
+\DeclareDictTranslation{figures}{figures}
+\DeclareDictTranslation{Figure}{Figure}
+\DeclareDictTranslation{figure}{figure}
+\DeclareDictTranslation{From}{From}
+\DeclareDictTranslation{from}{from}
+\DeclareDictTranslation{Glossary}{Glossary}
+\DeclareDictTranslation{Index}{Index}
+\DeclareDictTranslation{Introduction}{Introduction}
+\DeclareDictTranslation{introduction}{introduction}
+\DeclareDictTranslation{List of Figures and Tables}{List of Figures and Tables}
+\DeclareDictTranslation{List of Figures}{List of Figures}
+\DeclareDictTranslation{List of Tables}{List of Tables}
+\DeclareDictTranslation{or}{or}
+\DeclareDictTranslation{Outline}{Outline}
+\DeclareDictTranslation{Overview}{Overview}
+\DeclareDictTranslation{Pages}{Pages}
+\DeclareDictTranslation{pages}{pages}
+\DeclareDictTranslation{Page}{Page}
+\DeclareDictTranslation{page}{page}
+\DeclareDictTranslation{Paragraphs}{Paragraphs}
+\DeclareDictTranslation{paragraphs}{paragraphs}
+\DeclareDictTranslation{Paragraph}{Paragraph}
+\DeclareDictTranslation{paragraph}{paragraph}
+\DeclareDictTranslation{Parts}{Parts}
+\DeclareDictTranslation{parts}{parts}
+\DeclareDictTranslation{Part}{Part}
+\DeclareDictTranslation{part}{part}
+\DeclareDictTranslation{Preface}{Preface}
+\DeclareDictTranslation{Proofs}{Proofs}
+\DeclareDictTranslation{proofs}{proofs}
+\DeclareDictTranslation{Proof}{Proof}
+\DeclareDictTranslation{proof}{proof}
+\DeclareDictTranslation{References}{References}
+\DeclareDictTranslation{Related work}{Related work}
+\DeclareDictTranslation{Related Work}{Related Work}
+\DeclareDictTranslation{Sections}{Sections}
+\DeclareDictTranslation{sections}{sections}
+\DeclareDictTranslation{Section}{Section}
+\DeclareDictTranslation{section}{section}
+\DeclareDictTranslation{See also}{See also}
+\DeclareDictTranslation{see also}{see also}
+\DeclareDictTranslation{See}{See}
+\DeclareDictTranslation{see}{see}
+\DeclareDictTranslation{Sketch of Proofs}{Sketch of Proofs}
+\DeclareDictTranslation{Sketch of proofs}{Sketch of proofs}
+\DeclareDictTranslation{Sketch of Proof}{Sketch of Proof}
+\DeclareDictTranslation{Sketch of proof}{Sketch of proof}
+\DeclareDictTranslation{Subsections}{Subsections}
+\DeclareDictTranslation{subsections}{subsections}
+\DeclareDictTranslation{Subsection}{Subsection}
+\DeclareDictTranslation{subsection}{subsection}
+\DeclareDictTranslation{Summary}{Summary}
+\DeclareDictTranslation{Tables}{Tables}
+\DeclareDictTranslation{tables}{tables}
+\DeclareDictTranslation{Table}{Table}
+\DeclareDictTranslation{table}{table}
+\DeclareDictTranslation{To}{To}
+\DeclareDictTranslation{to}{to}
diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl
new file mode 100644
index 00000000000..ce4965a5475
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-french.trsl
@@ -0,0 +1,87 @@
+\ProvideDictionaryFor{French}{translations-basic-dictionary}
+
+\DeclareDictTranslation{Abstract}{R\'{e}sum\'{e}}
+\DeclareDictTranslation{Addresses}{Adresses}
+\DeclareDictTranslation{addresses}{adresses}
+\DeclareDictTranslation{Address}{Adresse}
+\DeclareDictTranslation{address}{adresse}
+\DeclareDictTranslation{and}{et}
+\DeclareDictTranslation{Appendix}{Annexe}
+\DeclareDictTranslation{Authors}{Auteurs}
+\DeclareDictTranslation{authors}{auteur}
+\DeclareDictTranslation{Author}{Auteur}
+\DeclareDictTranslation{author}{auteur}
+\DeclareDictTranslation{Bibliography}{Bibliographie}
+\DeclareDictTranslation{cc}{Copie \`{a} }
+\DeclareDictTranslation{Chapters}{Chapitres}
+\DeclareDictTranslation{chapters}{chapitres}
+\DeclareDictTranslation{Chapter}{Chapitre}
+\DeclareDictTranslation{chapter}{chapitre}
+\DeclareDictTranslation{Conclusion}{Conclusion}
+\DeclareDictTranslation{conclusion}{conclusion}
+\DeclareDictTranslation{Contents}{Contenu}
+\DeclareDictTranslation{Continuation}{Suite}
+\DeclareDictTranslation{continuation}{suite}
+\DeclareDictTranslation{cont}{suite} % FIXME: unsure
+\DeclareDictTranslation{encl (plural)}{P.~J.}
+\DeclareDictTranslation{encl (singular)}{P.~J.}
+\DeclareDictTranslation{encl}{P.~J.}
+\DeclareDictTranslation{Figures}{Figures}
+\DeclareDictTranslation{figures}{figures}
+\DeclareDictTranslation{Figure}{Figure}
+\DeclareDictTranslation{figure}{figure}
+\DeclareDictTranslation{From}{De}
+\DeclareDictTranslation{from}{de}
+\DeclareDictTranslation{Glossary}{Glossaire}
+\DeclareDictTranslation{Index}{Index}
+\DeclareDictTranslation{Introduction}{Introduction}
+\DeclareDictTranslation{introduction}{introduction}
+\DeclareDictTranslation{List of Figures and Tables}{Liste des figures et des tableaux}
+\DeclareDictTranslation{List of Figures}{Liste des figures}
+\DeclareDictTranslation{List of Tables}{Liste des tableaux}
+\DeclareDictTranslation{or}{ou}
+\DeclareDictTranslation{Outline}{Plan}
+\DeclareDictTranslation{Overview}{Sommaire}
+\DeclareDictTranslation{Pages}{Pages}
+\DeclareDictTranslation{pages}{pages}
+\DeclareDictTranslation{Page}{Page}
+\DeclareDictTranslation{page}{page}
+\DeclareDictTranslation{Paragraphs}{Paragraphes}
+\DeclareDictTranslation{paragraphs}{paragraphes}
+\DeclareDictTranslation{Paragraph}{Paragraphe}
+\DeclareDictTranslation{paragraph}{paragraphe}
+\DeclareDictTranslation{Parts}{Parties}
+\DeclareDictTranslation{parts}{parties}
+\DeclareDictTranslation{Part}{Partie}
+\DeclareDictTranslation{part}{partie}
+\DeclareDictTranslation{Preface}{Pr\'{e}face}
+\DeclareDictTranslation{Proofs}{D\'{e}monstrations}
+\DeclareDictTranslation{proofs}{d\'{e}monstrations}
+\DeclareDictTranslation{Proof}{D\'{e}monstration}
+\DeclareDictTranslation{proof}{d\'{e}monstration}
+\DeclareDictTranslation{References}{R\'{e}f\'{e}rences}
+\DeclareDictTranslation{Related work}{travaux connexes}
+\DeclareDictTranslation{Related Work}{Travaux connexes}
+\DeclareDictTranslation{Sections}{Sections}
+\DeclareDictTranslation{sections}{sections}
+\DeclareDictTranslation{Section}{Section}
+\DeclareDictTranslation{section}{section}
+\DeclareDictTranslation{See also}{Voir aussi}
+\DeclareDictTranslation{see also}{voir aussi}
+\DeclareDictTranslation{See}{Voir}
+\DeclareDictTranslation{see}{voir}
+\DeclareDictTranslation{Sketch of Proofs}{Esquisse de preuves}
+\DeclareDictTranslation{Sketch of proofs}{Esquisse de preuves}
+\DeclareDictTranslation{Sketch of Proof}{Esquisse de preuve}
+\DeclareDictTranslation{Sketch of proof}{Esquisse de preuve}
+\DeclareDictTranslation{Subsections}{Sous-sections}
+\DeclareDictTranslation{subsections}{sous-sections}
+\DeclareDictTranslation{Subsection}{Sous-section}
+\DeclareDictTranslation{subsection}{sous-section}
+\DeclareDictTranslation{Summary}{R\'{e}sum\'{e}}
+\DeclareDictTranslation{Tables}{Tables}
+\DeclareDictTranslation{tables}{tables}
+\DeclareDictTranslation{Table}{Table}
+\DeclareDictTranslation{table}{table}
+\DeclareDictTranslation{To}{Vers}%??
+\DeclareDictTranslation{to}{vers}%??
diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl
new file mode 100644
index 00000000000..95732490944
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-german.trsl
@@ -0,0 +1,87 @@
+\ProvideDictionaryFor{German}{translations-basic-dictionary}
+
+\DeclareDictTranslation{Abstract}{Zusammenfassung}
+\DeclareDictTranslation{Addresses}{Adressen}
+\DeclareDictTranslation{addresses}{Adressen}
+\DeclareDictTranslation{Address}{Adresse}
+\DeclareDictTranslation{address}{Adresse}
+\DeclareDictTranslation{and}{und}
+\DeclareDictTranslation{Appendix}{Anhang}
+\DeclareDictTranslation{Authors}{Autoren}
+\DeclareDictTranslation{authors}{Autoren}
+\DeclareDictTranslation{Author}{Autor}
+\DeclareDictTranslation{author}{Autor}
+\DeclareDictTranslation{Bibliography}{Literaturverzeichnis}
+\DeclareDictTranslation{cc}{Verteiler}
+\DeclareDictTranslation{Chapters}{Kapitel}
+\DeclareDictTranslation{chapters}{Kapitel}
+\DeclareDictTranslation{Chapter}{Kapitel}
+\DeclareDictTranslation{chapter}{Kapitel}
+\DeclareDictTranslation{Conclusion}{Zusammenfassung}
+\DeclareDictTranslation{conclusion}{Zusammenfassung}
+\DeclareDictTranslation{Contents}{Inhaltsverzeichnis}
+\DeclareDictTranslation{Continuation}{Fortsetzung}
+\DeclareDictTranslation{continuation}{Fortsetzung}
+\DeclareDictTranslation{cont}{Forts}
+\DeclareDictTranslation{encl (plural)}{Anlagen}
+\DeclareDictTranslation{encl (singular)}{Anlage}
+\DeclareDictTranslation{encl}{Anlage(n)}
+\DeclareDictTranslation{Figures}{Abbildungen}
+\DeclareDictTranslation{figures}{Abbildungen}
+\DeclareDictTranslation{Figure}{Abbildung}
+\DeclareDictTranslation{figure}{Abbildung}
+\DeclareDictTranslation{From}{Von}
+\DeclareDictTranslation{from}{von}
+\DeclareDictTranslation{Glossary}{Glossar}
+\DeclareDictTranslation{Index}{Index}
+\DeclareDictTranslation{Introduction}{Einleitung}
+\DeclareDictTranslation{introduction}{Einleitung}
+\DeclareDictTranslation{List of Figures and Tables}{Abbildungs- und Tabellenverzeichnis}
+\DeclareDictTranslation{List of Figures}{Abbildungsverzeichnis}
+\DeclareDictTranslation{List of Tables}{Tabellenverzeichnis}
+\DeclareDictTranslation{or}{oder}
+\DeclareDictTranslation{Outline}{Gliederung}
+\DeclareDictTranslation{Overview}{\"Uber\-sicht}
+\DeclareDictTranslation{Pages}{Seiten}
+\DeclareDictTranslation{pages}{Seiten}
+\DeclareDictTranslation{Page}{Seite}
+\DeclareDictTranslation{page}{Seite}
+\DeclareDictTranslation{Paragraphs}{Ab\-s\"at\-ze}
+\DeclareDictTranslation{paragraphs}{Ab\-s\"at\-ze}
+\DeclareDictTranslation{Paragraph}{Absatz}
+\DeclareDictTranslation{paragraph}{Absatz}
+\DeclareDictTranslation{Parts}{Teile}
+\DeclareDictTranslation{parts}{Teile}
+\DeclareDictTranslation{Part}{Teil}
+\DeclareDictTranslation{part}{Teil}
+\DeclareDictTranslation{Preface}{Vorwort}
+\DeclareDictTranslation{Proofs}{Beweise}
+\DeclareDictTranslation{proofs}{Beweise}
+\DeclareDictTranslation{Proof}{Beweis}
+\DeclareDictTranslation{proof}{Beweis}
+\DeclareDictTranslation{References}{Literatur}
+\DeclareDictTranslation{Related work}{Verwandte Arbeiten}
+\DeclareDictTranslation{Related Work}{Verwandte Arbeiten}
+\DeclareDictTranslation{Sections}{Abschnitte}
+\DeclareDictTranslation{sections}{Abschnitte}
+\DeclareDictTranslation{Section}{Abschnitt}
+\DeclareDictTranslation{section}{Abschnitt}
+\DeclareDictTranslation{See also}{Siehe auch}
+\DeclareDictTranslation{see also}{siehe auch}
+\DeclareDictTranslation{See}{Siehe}
+\DeclareDictTranslation{see}{siehe}
+\DeclareDictTranslation{Sketch of Proofs}{Beweisskizzen}
+\DeclareDictTranslation{Sketch of proofs}{Beweisskizzen}
+\DeclareDictTranslation{Sketch of Proof}{Beweisskizze}
+\DeclareDictTranslation{Sketch of proof}{Beweisskizze}
+\DeclareDictTranslation{Subsections}{Unterabschnitte}
+\DeclareDictTranslation{subsections}{Unterabschnitte}
+\DeclareDictTranslation{Subsection}{Unterabschnitt}
+\DeclareDictTranslation{subsection}{Unterabschnitt}
+\DeclareDictTranslation{Summary}{Zusammenfassung}
+\DeclareDictTranslation{Tables}{Tabellen}
+\DeclareDictTranslation{tables}{Tabellen}
+\DeclareDictTranslation{Table}{Tabelle}
+\DeclareDictTranslation{table}{Tabelle}
+\DeclareDictTranslation{To}{An}
+\DeclareDictTranslation{to}{an}
diff --git a/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl
new file mode 100644
index 00000000000..69e0824b103
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/exsheets/dicts/translations-basic-dictionary-spanish.trsl
@@ -0,0 +1,87 @@
+\ProvideDictionaryFor{Spanish}{translations-basic-dictionary}
+
+\DeclareDictTranslation{Abstract}{Resumen}
+\DeclareDictTranslation{Addresses}{Direcciones}
+\DeclareDictTranslation{addresses}{direcciones}
+\DeclareDictTranslation{Address}{Direcci\'{o}n}
+\DeclareDictTranslation{address}{direcci\'{o}n}
+\DeclareDictTranslation{and}{y}
+\DeclareDictTranslation{Appendix}{Ap\'{e}ndice}
+\DeclareDictTranslation{Authors}{Autores}
+\DeclareDictTranslation{authors}{autores}
+\DeclareDictTranslation{Author}{Autor}
+\DeclareDictTranslation{author}{autor}
+\DeclareDictTranslation{Bibliography}{Bibliograf\'{\i}a}
+\DeclareDictTranslation{cc}{c.c.}
+\DeclareDictTranslation{Chapters}{Cap\'{\i}tulos}
+\DeclareDictTranslation{chapters}{cap\'{\i}tulos}
+\DeclareDictTranslation{Chapter}{Cap\'{\i}tulo}
+\DeclareDictTranslation{chapter}{cap\'{\i}tulo}
+\DeclareDictTranslation{Conclusion}{Conclusi\'{o}n}
+\DeclareDictTranslation{conclusion}{conclusi\'{o}n}
+\DeclareDictTranslation{Contents}{Contenido}
+\DeclareDictTranslation{Continuation}{Continuaci\'{o}n}
+\DeclareDictTranslation{continuation}{continuaci\'{o}n}
+\DeclareDictTranslation{cont}{cont}
+\DeclareDictTranslation{encl (plural)}{adj.}
+\DeclareDictTranslation{encl (singular)}{adj.}
+\DeclareDictTranslation{encl}{adj.}
+\DeclareDictTranslation{Figures}{Figuras}
+\DeclareDictTranslation{figures}{figuras}
+\DeclareDictTranslation{Figure}{Figura}
+\DeclareDictTranslation{figure}{figura}
+\DeclareDictTranslation{From}{Desde}
+\DeclareDictTranslation{from}{desde}
+\DeclareDictTranslation{Glossary}{Glosario}
+\DeclareDictTranslation{Index}{\'{I}ndice}
+\DeclareDictTranslation{Introduction}{Introducci\'{o}n}
+\DeclareDictTranslation{introduction}{introducci\'{o}n}
+\DeclareDictTranslation{List of Figures and Tables}{Lista de Figuras y Tablas}
+\DeclareDictTranslation{List of Figures}{Lista de Figuras}
+\DeclareDictTranslation{List of Tables}{Lista de Tablas}
+\DeclareDictTranslation{or}{o}
+\DeclareDictTranslation{Outline}{Esbozo}
+\DeclareDictTranslation{Overview}{Visi\'{o}n General}
+\DeclareDictTranslation{Pages}{P\'{a}ginas}
+\DeclareDictTranslation{pages}{p\'{a}ginas}
+\DeclareDictTranslation{Page}{P\'{a}gina}
+\DeclareDictTranslation{page}{p\'{a}gina}
+\DeclareDictTranslation{Paragraphs}{P\'{a}rrafos}
+\DeclareDictTranslation{paragraphs}{p\'{a}rrafos}
+\DeclareDictTranslation{Paragraph}{P\'{a}rrafo}
+\DeclareDictTranslation{paragraph}{p\'{a}rrafo}
+\DeclareDictTranslation{Parts}{Partes}
+\DeclareDictTranslation{parts}{partes}
+\DeclareDictTranslation{Part}{Parte}
+\DeclareDictTranslation{part}{parte}
+\DeclareDictTranslation{Preface}{Prefacio}
+\DeclareDictTranslation{Proofs}{Demostraciones}
+\DeclareDictTranslation{proofs}{demostraciones}
+\DeclareDictTranslation{Proof}{Demostraci\'{o}n}
+\DeclareDictTranslation{proof}{demostraci\'{o}n}
+\DeclareDictTranslation{References}{Referencias}
+\DeclareDictTranslation{Related work}{Trabajo relacionado}
+\DeclareDictTranslation{Related Work}{Trabajo Relacionado}
+\DeclareDictTranslation{Sections}{Secciones}
+\DeclareDictTranslation{sections}{secciones}
+\DeclareDictTranslation{Section}{Secci\'{o}n}
+\DeclareDictTranslation{section}{secci\'{o}n}
+\DeclareDictTranslation{See also}{Ver tambi\'{e}n}
+\DeclareDictTranslation{see also}{ver tambi\'{e}n}
+\DeclareDictTranslation{See}{Ver}
+\DeclareDictTranslation{see}{ver}
+\DeclareDictTranslation{Sketch of Proofs}{Esbozo de Demostraciones}
+\DeclareDictTranslation{Sketch of proofs}{Esbozo de demostraciones}
+\DeclareDictTranslation{Sketch of Proof}{Esbozo de Demostraci\'{o}n}
+\DeclareDictTranslation{Sketch of proof}{Esbozo de demostraci\'{o}n}
+\DeclareDictTranslation{Subsections}{Subsecciones}
+\DeclareDictTranslation{subsections}{subsecciones}
+\DeclareDictTranslation{Subsection}{Subsecci\'{o}n}
+\DeclareDictTranslation{subsection}{subsecci\'{o}n}
+\DeclareDictTranslation{Summary}{Resumen}
+\DeclareDictTranslation{Tables}{Tablas}
+\DeclareDictTranslation{tables}{tablas}
+\DeclareDictTranslation{Table}{Tabla}
+\DeclareDictTranslation{table}{tabla}
+\DeclareDictTranslation{To}{Hasta}
+\DeclareDictTranslation{to}{hasta}
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index 8ad8e86a9a7..e4b2856baf5 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
@@ -31,8 +31,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% ----------------------------------------------------------------------------
-\def\exsheets@date{2013/02/17}
-\def\exsheets@version{0.7b}
+\def\exsheets@date{2013/03/10}
+\def\exsheets@version{0.8}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -72,12 +72,18 @@
pretend~nothing~happened.
}
-\msg_new:nnn { exsheets } { random }
+\msg_new:nnn { exsheets } { random-file }
{
- You~asked~me~to~select~#1~questions~from~file~#2~but~there~are~only~#3.~
+ You~asked~me~to~select~#1~questions~from~file~#2~which~contains~#3~questions.~
I'll~select~all~of~them.
}
+\msg_new:nnn { exsheets } { random-selectable }
+ {
+ You~asked~me~to~select~#1~questions~from~file~#2~which~contains~#3~questions.~
+ #4~of~these~are~selectable,~so~I'll~select~all~of~them.
+ }
+
\msg_new:nnn { exsheets } { only-inside-question }
{
The~command~\token_to_str:N #1 \c_space_tl can~only~be~used~inside~
@@ -532,7 +538,7 @@
% inspiration of the following features
\int_zero_new:N \l__exsheets_variations_int
-\cs_new:Npn \exsheets_set_variations:n #1
+\cs_new_protected:Npn \exsheets_set_variations:n #1
{
\int_compare:nNnTF { #1 } < { 2 }
{ \msg_warning:nnn { exsheets } { variations } { #1 } }
@@ -554,7 +560,7 @@
}
}
-\cs_new:Npn \exsheets_variant:n #1
+\cs_new_protected:Npn \exsheets_variant:n #1
{
\bool_if:nTF
{
@@ -588,14 +594,14 @@
\cs_new:Npn \exsheets_last_variant: { }
-\cs_new:Npn \__exsheets_generate_variation_auxiliary:n #1
+\cs_new_protected:Npn \__exsheets_generate_variation_auxiliary:n #1
{
\cs_if_exist:cTF { __exsheets_variation_ \int_to_roman:n { #1 } :n }
{ \cs_set:cpn { __exsheets_variation_ \int_to_roman:n { #1 } :n } { } }
{ \cs_new:cpn { __exsheets_variation_ \int_to_roman:n { #1 } :n } { } }
}
-\cs_new:Npn \__exsheets_reset_variation_auxiliary:n #1
+\cs_new_protected:Npn \__exsheets_reset_variation_auxiliary:n #1
{
\cs_set:cpn { __exsheets_variation_ \int_to_roman:n { #1 } :n } ##1
{ \use:c { __exsheets_variation_ \int_to_roman:n { #1 + 1 } :n } }
@@ -641,17 +647,17 @@
\cs_new:Npn \exsheets_strip_braces:N #1
{ \exp_after:wN \__exsheets_strip_braces:w \exp_after:wN #1#1 \q_stop }
-\cs_new:Npn \__exsheets_strip_braces:w #1#2 \q_stop
+\cs_new_protected:Npn \__exsheets_strip_braces:w #1#2 \q_stop
{ \tl_set:Nn #1 { #2 } }
-\cs_new:Npn \__exsheets_declare_relgrades:n #1
+\cs_new_protected:Npn \__exsheets_declare_relgrades:n #1
{
\clist_set:Nn \l__exsheets_tmpa_clist { #1 }
\clist_map_inline:Nn \l__exsheets_tmpa_clist
{ \__exsheets_declare_relgrade:w ##1 \q_stop }
}
-\cs_new:Npn \__exsheets_declare_relgrade:w #1 = #2 \q_stop
+\cs_new_protected:Npn \__exsheets_declare_relgrade:w #1 = #2 \q_stop
{
\tl_set:Nn \l__exsheets_tmpa_tl { #1 }
\tl_set:Nn \l__exsheets_tmpb_tl { #2 }
@@ -666,7 +672,7 @@
\NewDocumentCommand \DeclareRelGrades { m }
{ \__exsheets_declare_relgrades:n { #1 } }
-\@onlypreamble\DeclareRelGrades
+\@onlypreamble \DeclareRelGrades
\cs_new:Npn \__exsheets_grade:nn #1#2
{
@@ -702,36 +708,15 @@
% ----------------------------------------------------------------------------
% Aufgaben und Lösungen
-
-% Einteilung in Klassen und Themen
-\prop_new:N \g__exsheets_questions_class_prop
-\prop_new:N \g__exsheets_classes_prop
-\prop_new:N \g__exsheets_classes_active_prop
-\prop_new:N \g__exsheets_questions_topic_prop
-\prop_new:N \g__exsheets_topics_prop
-\prop_new:N \g__exsheets_topics_active_prop
-
\bool_new:N \g__exsheets_questions_use_bool
\bool_gset_true:N \g__exsheets_questions_use_bool
\bool_new:N \l__exsheets_questions_use_bool
\bool_set_true:N \l__exsheets_questions_use_bool
\bool_new:N \l__exsheets_questions_deactivate_bool
-\bool_new:N \l__exsheets_questions_class_bool
-\bool_set_false:N \l__exsheets_questions_class_bool
-\bool_new:N \g__exsheets_use_classes_bool
-\bool_gset_false:N \g__exsheets_use_classes_bool
-\bool_new:N \l__exsheets_class_active_bool
-\bool_new:N \l__exsheets_questions_topic_bool
-\bool_set_false:N \l__exsheets_questions_topic_bool
-\bool_new:N \g__exsheets_use_topics_bool
-\bool_gset_false:N \g__exsheets_use_topics_bool
-\bool_new:N \l__exsheets_topic_active_bool
+
\bool_new:N \l__exsheets_solutions_use_bool
\bool_set_true:N \l__exsheets_solutions_use_bool
-\tl_new:N \l__exsheets_questions_class_tl
-\tl_new:N \l__exsheets_questions_topic_tl
-
\dim_new:N \l__exsheets_questions_skip_below_dim
\dim_set:Nn \l__exsheets_questions_skip_below_dim { .5\baselineskip }
\dim_new:N \l__exsheets_solutions_skip_below_dim
@@ -742,160 +727,122 @@
\keys_define:nn { exsheets }
{
- use-classes .code:n =
- {
- \bool_gset_true:N \g__exsheets_use_classes_bool
- \__exsheets_activate_classes:n { #1 }
- } ,
- use-topics .code:n =
- {
- \bool_gset_true:N \g__exsheets_use_topics_bool
- \__exsheets_activate_topics:n { #1 }
- } ,
skip-below .code:n =
\dim_set:Nn \l__exsheets_questions_skip_below_dim { #1 }
\dim_set:Nn \l__exsheets_solutions_skip_below_dim { #1 }
}
-\cs_new:Npn \__exsheets_activate_classes:n #1
- {
- \prop_gclear:N \g__exsheets_classes_active_prop
- \seq_set_split:Nnn \l__exsheets_tmpa_seq { , } { #1 }
- \seq_map_inline:Nn \l__exsheets_tmpa_seq
- {
- \prop_gput:Nnn \g__exsheets_classes_active_prop
- { ##1 } { \__exsheets_dummy: }
- }
- }
-
-\cs_new:Npn \__exsheets_activate_topics:n #1
- {
- \prop_gclear:N \g__exsheets_topics_active_prop
- \seq_set_split:Nnn \l__exsheets_tmpa_seq { , } { #1 }
- \seq_map_inline:Nn \l__exsheets_tmpa_seq
- {
- \prop_gput:Nnn \g__exsheets_topics_active_prop
- { ##1 } { \__exsheets_dummy: }
- }
- }
+% Einteilung in Klassen, Themen und andere Gruppierungen:
+\prop_new:N \l__exsheets_class_prop
+\tl_new:N \l__exsheets_step_counter_tl
+\bool_new:N \l__exsheets_use_this_question_bool
-\cs_new_nopar:Npn \__exsheets_questions_use_classes:
+\cs_new_protected:Npn \exsheets_new_question_class:nn #1#2
{
- % is there a class provided?
- \bool_if:NT \l__exsheets_questions_class_bool
+ \prop_put:Nnn \l__exsheets_class_prop { #2 } { #1 }
+ \prop_new:c { g__exsheets_questions_#1_prop }
+ \prop_new:c { g__exsheets_#2_prop }
+ \prop_new:c { g__exsheets_#2_active_prop }
+ \bool_new:c { l__exsheets_questions_#1_bool }
+ \bool_new:c { g__exsheets_use_#2_bool }
+ \bool_new:c { l__exsheets_#1_active_bool }
+ \tl_new:c { l__exsheets_questions_#1_tl }
+ \keys_define:nn { exsheets }
{
- % add class to questions property
- \prop_gput:Nff \g__exsheets_questions_class_prop
- { \int_to_arabic:n { \g__exsheets_questions_id_int } }
- { \l__exsheets_questions_class_tl }
- % add to classes list, if it's a new one
- \prop_get:NoN \g__exsheets_classes_prop
- { \l__exsheets_questions_class_tl }
- \l__exsheets_tmpa_tl
- \tl_if_eq:NNT \l__exsheets_tmpa_tl \q_no_value
+ use-#2 .code:n =
{
- \prop_gput:Nfn \g__exsheets_classes_prop
- { \l__exsheets_questions_class_tl }
- { \__exsheets_dummy: }
+ \bool_gset_true:c { g__exsheets_use_#2_bool }
+ \use:c { __exsheets_activate_#2:n } { ##1 }
+ } ,
+ question / #1 .code:n =
+ \bool_set_true:c { l__exsheets_questions_#1_bool }
+ \tl_set:cn { l__exsheets_questions_#1_tl } { ##1 }
+% \exsheets_set_question_properties:n { #1 = ##1 }
+ }
+ \cs_new_protected:cpn { __exsheets_activate_#2:n } ##1
+ {
+ \prop_gclear:c { g__exsheets_#2_active_prop }
+ \seq_set_split:Nnn \l__exsheets_tmpa_seq { , } { ##1 }
+ \seq_map_inline:Nn \l__exsheets_tmpa_seq
+ {
+ \prop_gput:cnn { g__exsheets_#2_active_prop }
+ { ####1 } { \__exsheets_dummy: }
}
}
- % are we using classes?
- \bool_if:NT \g__exsheets_use_classes_bool
+ \cs_new_protected:cpn { __exsheets_questions_use_#2: }
{
- % is this question an active one?
- \prop_get:NoN \g__exsheets_classes_active_prop
- { \l__exsheets_questions_class_tl }
- \l__exsheets_tmpa_tl
- \tl_if_eq:NNTF \l__exsheets_tmpa_tl \q_no_value
+ % is there a #1 provided?
+ \bool_if:cT { l__exsheets_questions_#1_bool }
{
- \bool_set_false:N \l__exsheets_class_active_bool
- \bool_set_false:N \l__exsheets_questions_print_bool
+ % add #1 to questions property
+ \prop_gput:cff { g__exsheets_questions_#1_prop }
+ { \int_to_arabic:n { \g__exsheets_questions_id_int } }
+ { \tl_use:c { l__exsheets_questions_#1_tl } }
+ % add to #2 list, if it's a new one
+ \prop_get:cfN { g__exsheets_#2_prop }
+ { \tl_use:c { l__exsheets_questions_#1_tl } }
+ \l__exsheets_tmpa_tl
+ \tl_if_eq:NNT \l__exsheets_tmpa_tl \q_no_value
+ {
+ \prop_gput:cfn { g__exsheets_#2_prop }
+ { \tl_use:c { l__exsheets_questions_#1_tl } }
+ { \__exsheets_dummy: }
+ }
}
- { \bool_set_true:N \l__exsheets_class_active_bool }
- }
- }
-
-\cs_new_nopar:Npn \__exsheets_questions_use_topics:
- {
- % is there a topic provided?
- \bool_if:NT \l__exsheets_questions_topic_bool
- {
- % add topic to questions property
- \prop_gput:Nff \g__exsheets_questions_topic_prop
- { \int_to_arabic:n { \g__exsheets_questions_id_int } }
- { \l__exsheets_questions_topic_tl }
- % add to topics list, if it's a new one
- \prop_get:NoN \g__exsheets_topics_prop
- { \l__exsheets_questions_topic_tl }
- \l__exsheets_tmpa_tl
- \tl_if_eq:NNT \l__exsheets_tmpa_tl \q_no_value
+ % are we using #2?
+ \bool_if:cT { g__exsheets_use_#2_bool }
{
- \prop_gput:Nfn \g__exsheets_topics_prop
- { \l__exsheets_questions_topic_tl }
- { \__exsheets_dummy: }
+ % is this question an active one?
+ \prop_get:cfN { g__exsheets_#2_active_prop }
+ { \tl_use:c { l__exsheets_questions_#1_tl } }
+ \l__exsheets_tmpa_tl
+ \tl_if_eq:NNTF \l__exsheets_tmpa_tl \q_no_value
+ {
+ \bool_set_false:c { l__exsheets_#1_active_bool }
+ \bool_set_false:N \l__exsheets_questions_print_bool
+ }
+ {
+ \bool_set_true:c { l__exsheets_#1_active_bool }
+ \bool_set_true:N \l__exsheets_use_this_question_bool
+ }
}
}
- % are we using topics?
- \bool_if:NT \g__exsheets_use_topics_bool
+ \cs_new_protected:cpn { __exsheets_solutions_use_#2: }
{
- % is this question an active one?
- \prop_get:NoN \g__exsheets_topics_active_prop
- { \l__exsheets_questions_topic_tl }
- \l__exsheets_tmpa_tl
- \tl_if_eq:NNTF \l__exsheets_tmpa_tl \q_no_value
+ % are we using #2?
+ \bool_if:cT { g__exsheets_use_#2_bool }
{
- \bool_set_false:N \l__exsheets_topic_active_bool
- \bool_set_false:N \l__exsheets_questions_print_bool
+ % is the question to this solution an active one?
+ % get question number from ID
+ \prop_get:NoN \g__exsheets_questions_id_prop
+ { \g__exsheets_questions_current_id_tl } \l__exsheets_tmpa_tl
+ % get question #1 from number
+ \prop_get:coN { g__exsheets_questions_#1_prop }
+ { \l__exsheets_tmpa_tl } \l__exsheets_tmpb_tl
+ % test if #1 is active
+ \prop_get:coN { g__exsheets_#2_active_prop }
+ { \l__exsheets_tmpb_tl } \l__exsheets_tmpc_tl
+ \tl_if_eq:NNT \l__exsheets_tmpc_tl \q_no_value
+ { \bool_set_false:N \l__exsheets_solutions_use_bool }
}
- { \bool_set_true:N \l__exsheets_topic_active_bool }
}
- \int_set:Nn \l__exsheets_counter_qu_int { \arabic{question} }
}
+\cs_generate_variant:Nn \prop_get:NnN { cf }
+\cs_generate_variant:Nn \prop_gput:Nnn { cf , cff }
-\cs_new_nopar:Npn \__exsheets_solutions_use_classes:
+\cs_new_protected:Npn \exsheets_declare_question_class:nn #1#2
{
- % are we using classes?
- \bool_if:NT \g__exsheets_use_classes_bool
- {
- % is the question to this solution an active one?
- % get question number from ID
- \prop_get:NoN \g__exsheets_questions_id_prop
- { \g__exsheets_questions_current_id_tl } \l__exsheets_tmpa_tl
- % get question class from number
- \prop_get:NoN \g__exsheets_questions_class_prop
- { \l__exsheets_tmpa_tl } \l__exsheets_tmpb_tl
- % test if class is active
- \prop_get:NoN \g__exsheets_classes_active_prop
- { \l__exsheets_tmpb_tl } \l__exsheets_tmpc_tl
- \tl_if_eq:NNTF \l__exsheets_tmpc_tl \q_no_value
- { \bool_set_false:N \l__exsheets_solutions_use_bool }
- { \bool_set_true:N \l__exsheets_solutions_use_bool }
- }
+ \prop_if_in:NnTF \l__exsheets_class_prop { #2 }
+ {}
+ { \exsheets_new_question_class:nn { #1 } { #2 } }
}
-\cs_new_nopar:Npn \__exsheets_solutions_use_topics:
+\NewDocumentCommand \DeclareQuestionClass { mm }
{
- % are we using topics?
- \bool_if:NTF \g__exsheets_use_topics_bool
- {
- % is the question to this solution an active one?
- % get question number from ID
- \prop_get:NoN \g__exsheets_questions_id_prop
- { \g__exsheets_questions_current_id_tl } \l__exsheets_tmpa_tl
- % get question topic from number
- \prop_get:NoN \g__exsheets_questions_topic_prop
- { \l__exsheets_tmpa_tl } \l__exsheets_tmpb_tl
- % test if topic is active
- \prop_get:NoN \g__exsheets_topics_active_prop
- { \l__exsheets_tmpb_tl } \l__exsheets_tmpc_tl
- \tl_if_eq:NNT \l__exsheets_tmpc_tl \q_no_value
- { \bool_set_false:N \l__exsheets_solutions_use_bool }
- }
- {
- \bool_if:NF \g__exsheets_use_classes_bool
- { \bool_set_true:N \l__exsheets_solutions_use_bool }
- }
+ \exsheets_declare_question_class:nn { #1 } { #2 }
+% \exsheets_declare_question_property:n { #1 }
}
+\@onlypreamble \DeclareQuestionClass
% ----------------------------------------------------------------------------
% die 'question' Umgebung
@@ -957,7 +904,7 @@
\bool_new:N \l__exsheets_points_not_given_bool
-\cs_new:Npn \__exsheets_read_points:w #1+#2+#3 \q_stop
+\cs_new_protected:Npn \__exsheets_read_points:w #1+#2+#3 \q_stop
{
\tl_if_blank:nTF { #1 }
{ \fp_zero:N \l__exsheets_question_points_fp }
@@ -1071,21 +1018,37 @@
}
% Auswahl der Frage:
\__exsheets_select_question:V \g__exsheets_questions_current_id_tl
+ \prop_map_inline:Nn \l__exsheets_class_prop
+ {
+ \use:c { __exsheets_questions_use_##1: }
+ }
\bool_if:nT
{
\g__exsheets_questions_use_bool &&
!\l__exsheets_questions_deactivate_bool
}
{
- \__exsheets_questions_use_classes:
- \__exsheets_questions_use_topics:
- \bool_if:nT
+ \tl_clear:N \l__exsheets_step_counter_tl
+ % das ist etwas mühsam: abhängig von der Nutzung der verschiedenen
+ % Gruppierungsmöglichkeiten muss der Counter erhöht werden:
+ \prop_map_inline:Nn \l__exsheets_class_prop
{
- ( \l__exsheets_class_active_bool && \l__exsheets_topic_active_bool ) ||
- ( \l__exsheets_class_active_bool && !\g__exsheets_use_topics_bool ) ||
- ( !\g__exsheets_use_classes_bool && \l__exsheets_topic_active_bool ) ||
- ( !\g__exsheets_use_classes_bool && !\g__exsheets_use_topics_bool )
+ \use:c { __exsheets_questions_use_##1: }
+ \bool_if:nTF
+ {
+ (
+ \l__exsheets_use_this_question_bool
+ &&
+ \bool_if_p:c { l__exsheets_##2_active_bool }
+ )
+ ||
+ ! \bool_if_p:c { g__exsheets_use_##1_bool }
+ }
+ { \tl_put_right:Nn \l__exsheets_step_counter_tl { y } }
+ { \tl_put_right:Nn \l__exsheets_step_counter_tl { n } }
}
+ % erhöhe jetzt, wenn kein Nein dabei war:
+ \tl_if_in:NnF \l__exsheets_step_counter_tl { n }
{ \refstepcounter{question} }
\__exsheets_get_sectioning_numbers:
\bool_if:nT
@@ -1105,7 +1068,6 @@
}
\bool_if:NT \l__exsheets_questions_print_bool
{
-% \exsheets_questions_debug:
\bool_if:NTF \l__exsheets_exam_bool
{ \tl_set_eq:NN \l__exsheets_title_tl \l__exsheets_questions_name_tl }
{ \tl_set_eq:NN \l__exsheets_title_tl \l__exsheets_exsheets_name_tl }
@@ -1127,57 +1089,40 @@
\cs_new_protected:Npn \exsheets@save@number #1#2
{ \expandafter\global\expandafter\edef\csname exsheets@question@#1\endcsname{#2} }
-\cs_new:Npn \__exsheets_save_number_in:N #1
+\cs_new_protected:Npn \__exsheets_save_number_in_aux_x:Nnn #1#2#3
+ {
+ \prop_gput:Nfx #1 { #2 } { #3 }
+ \iow_now:Nx \@auxout { \exsheets@save@number { #2 } { #3 } }
+ }
+\cs_generate_variant:Nn \prop_get:NnNTF { Nx }
+
+\cs_new_protected:Npn \__exsheets_save_number_in:N #1
{
\bool_if:NTF \l__exsheets_print_number_bool
{
\cs_if_exist:NTF \thechapter
{
- \prop_gput:Nfx #1
+ \__exsheets_save_number_in_aux_x:Nnn #1
{ \int_use:N \g__exsheets_questions_id_int }
{ \arabic{chapter}-\arabic{section}-\arabic{question} }
- \iow_now:Nx \@auxout
- {
- \exsheets@save@number
- { \g__exsheets_questions_current_id_tl }
- { \arabic{chapter}-\arabic{section}-\arabic{question} }
- }
}
{
- \prop_gput:Nfx #1
+ \__exsheets_save_number_in_aux_x:Nnn #1
{ \int_use:N \g__exsheets_questions_id_int }
{ -\arabic{section}-\arabic{question} }
- \iow_now:Nx \@auxout
- {
- \exsheets@save@number
- { \g__exsheets_questions_current_id_tl }
- { -\arabic{section}-\arabic{question} }
- }
}
}
{
\cs_if_exist:NTF \thechapter
{
- \prop_gput:Nfx #1
+ \__exsheets_save_number_in_aux_x:Nnn #1
{ \int_use:N \g__exsheets_questions_id_int }
{ @@@\arabic{chapter}-\arabic{section}-\arabic{question} }
- \iow_now:Nx \@auxout
- {
- \exsheets@save@number
- { \g__exsheets_questions_current_id_tl }
- { @@@\arabic{chapter}-\arabic{section}-\arabic{question} }
- }
}
{
- \prop_gput:Nfx #1
+ \__exsheets_save_number_in_aux_x:Nnn #1
{ \int_use:N \g__exsheets_questions_id_int }
{ @@@-\arabic{section}-\arabic{question} }
- \iow_now:Nx \@auxout
- {
- \exsheets@save@number
- { \g__exsheets_questions_current_id_tl }
- { @@@-\arabic{section}-\arabic{question} }
- }
}
}
}
@@ -1197,9 +1142,16 @@
\cs_generate_variant:Nn \__exsheets_restore_number_from_and_do:Nnn { NV }
\NewDocumentCommand \QuestionNumber { m }
- { \exsheets_question_number:c { exsheets@question@#1 } }
+ { \exsheets_question_number:n { #1 } }
-\cs_new:Npn \exsheets_question_number:N #1
+\cs_new_protected:Npn \exsheets_question_number:n #1
+ {
+ \prop_get:NnNTF \g__exsheets_questions_id_prop { #1 } \l__exsheets_tmpa_tl
+ { \__exsheets_question_number:c { exsheets@question@\l__exsheets_tmpa_tl } }
+ { \textbf{??} }
+ }
+
+\cs_new:Npn \__exsheets_question_number:N #1
{
\cs_if_exist:NTF #1
{
@@ -1208,9 +1160,9 @@
}
{ \textbf{??} }
}
-\cs_generate_variant:Nn \exsheets_question_number:N { c }
+\cs_generate_variant:Nn \__exsheets_question_number:N { c }
-\cs_new:Npn \__exsheets_get_question_number:w #1-#2-#3 \q_stop
+\cs_new_protected:Npn \__exsheets_get_question_number:w #1-#2-#3 \q_stop
{
\cs_if_exist:NT \thechapter
{ \int_set:Nn \l__exsheets_counter_ch_int { #1 } }
@@ -1262,12 +1214,6 @@
print .default:n = true ,
ID .tl_set:N = \l__exsheets_questions_id_tl ,
label .tl_set:N = \l__exsheets_questions_label_tl ,
- class .code:n =
- \bool_set_true:N \l__exsheets_questions_class_bool
- \tl_set:Nn \l__exsheets_questions_class_tl { #1 } ,
- topic .code:n =
- \bool_set_true:N \l__exsheets_questions_topic_bool
- \tl_set:Nn \l__exsheets_questions_topic_tl { #1 } ,
use .choice: ,
use / true .code:n =
\bool_gset_true:N \g__exsheets_questions_use_bool
@@ -1281,31 +1227,18 @@
% ----------------------------------------------------------------------------
% using ``metadata'':
-\cs_new:Npn \__exsheets_declare_question_property:n #1
+\cs_new_protected:Npn \exsheets_declare_question_property:n #1
{
\prop_new:c { g__exsheets_question_property_#1_prop }
\keys_define:nn { question / meta }
{ #1 .code:n = \__exsheets_question_set_property:nn { #1 } { ##1 } }
}
-\cs_new_eq:NN \exsheets_declare_question_property:n
- \__exsheets_declare_question_property:n
-
\NewDocumentCommand \DeclareQuestionProperty { m }
{ \exsheets_declare_question_property:n { #1 } }
-\@onlypreamble\DeclareQuestionProperty
-
-\DeclareQuestionProperty{points}
-\bool_if:NT \l__exsheets_auto_label_bool
- {
- \DeclareQuestionProperty{ref}
- \DeclareQuestionProperty{pageref}
- }
+\@onlypreamble \DeclareQuestionProperty
-\NewDocumentCommand \SetQuestionProperties { m }
- { \exsheets_set_question_properties:n { #1 } }
-
-\cs_new:Npn \__exsheets_set_question_properties:n #1
+\cs_new_protected:Npn \exsheets_set_question_properties:n #1
{
\@bsphack
\bool_if:NTF \l__exsheets_inside_question_bool
@@ -1317,10 +1250,10 @@
\@esphack
}
-\cs_new_eq:NN \exsheets_set_question_properties:n
- \__exsheets_set_question_properties:n
+\NewDocumentCommand \SetQuestionProperties { m }
+ { \exsheets_set_question_properties:n { #1 } }
-\cs_new:Npn \__exsheets_question_set_property:nn #1#2
+\cs_new_protected:Npn \__exsheets_question_set_property:nn #1#2
{
\prop_gput:cVn { g__exsheets_question_property_#1_prop }
\g__exsheets_questions_current_id_tl { #2 }
@@ -1336,7 +1269,7 @@
}
\int_new:N \g__exsheets_tmpa_int
-\cs_new:Npn \ForEachQuestion #1
+\cs_new_protected:Npn \ForEachQuestion #1
{
\int_gzero:N \g__exsheets_tmpa_int
\prop_map_inline:Nn \g__exsheets_questions_used_prop
@@ -1359,23 +1292,47 @@
\colorlet { exsheetsdebugcolor } { yellow }
+\cs_new:Npn \exsheets_debug_box:nn #1#2
+ {
+ \exsheets_par:
+ \noindent
+ \group_begin:
+ \normalfont\normalsize\normalcolor
+ \colorbox { exsheetsdebugcolor }
+ { \parbox { \dim_eval:n { #1 - 2 \fboxsep } } { #2 } }
+ \group_end:
+ \exsheets_par:
+ }
+
+\cs_new:Npn \__exsheets_list_comma: {}
+
\cs_new_nopar:Npn \exsheets_questions_debug:
{
- \bool_if:nT { \l__exsheets_questions_debug_bool && \l__exsheets_inside_question_bool }
+ \bool_if:nT
+ { \l__exsheets_questions_debug_bool && \l__exsheets_inside_question_bool }
{
- \colorbox { exsheetsdebugcolor }
+ \exsheets_debug_box:nn { \linewidth }
{
- \group_begin:
- \normalfont\normalsize\normalcolor
- ID:~
- \tl_if_blank:VTF \l__exsheets_questions_id_tl
- { \int_use:N \g__exsheets_questions_id_int }
- { \tl_use:N \l__exsheets_questions_id_tl }
- \bool_if:NT \l__exsheets_questions_class_bool
- { ,~CLASS:~ \tl_use:N \l__exsheets_questions_class_tl }
- \bool_if:NT \l__exsheets_questions_topic_bool
- { ,~TOPIC:~ \tl_use:N \l__exsheets_questions_topic_tl }
- \group_end:
+ \fbox
+ {
+ ID:~
+ \textit
+ {
+ \tl_if_blank:VTF \l__exsheets_questions_id_tl
+ { \int_use:N \g__exsheets_questions_id_int }
+ { \tl_use:N \l__exsheets_questions_id_tl }
+ }
+ }
+ \cs_set_protected:Npn \__exsheets_list_comma:
+ { ~ \cs_set:Npn \__exsheets_list_comma: { ,~ } }
+ \prop_map_inline:Nn \l__exsheets_class_prop
+ {
+ \bool_if:cT { l__exsheets_questions_##2_bool }
+ {
+ \__exsheets_list_comma: ##2:~
+ \textit { \tl_use:c { l__exsheets_questions_##2_tl } }
+ }
+ }
}
}
}
@@ -1393,22 +1350,21 @@
\bool_set_true:N \l__exsheets_include_all_bool
\prop_new:N \g__exsheets_selected_questions_prop
\clist_new:N \l__exsheets_include_id_clist
+\clist_new:N \l__exsheets_exclude_id_clist
+\clist_new:N \questionsincludedlast
\int_new:N \l__exsheets_include_random_int
\int_zero:N \l__exsheets_include_random_int
\cs_new:Npn \exsheets_file_input_if_exist:n #1
{ \file_if_exist:nT { #1 } { \file_input:n { #1 } } }
-\cs_if_exist:NF \prop_length:N
+\cs_new_protected:Npn \exsheets_prop_count:N #1
{
- \cs_new:Npn \prop_length:N #1
- {
- \prop_length:NN #1 \l_tmpa_int
- \int_use:N \l_tmpa_int
- }
+ \__exsheets_prop_count:NN #1 \l_tmpa_int
+ \int_use:N \l_tmpa_int
}
-\cs_new:Npn \prop_length:NN #1#2
+\cs_new_protected:Npn \__exsheets_prop_count:NN #1#2
{
\int_zero:N #2
\prop_map_inline:Nn #1
@@ -1424,37 +1380,57 @@
\group_end:
}
-\cs_new:Npn \exsheets_include_questions:n #1
+\cs_new_protected:Npn \exsheets_include_questions:n #1
{
\bool_set_true:N \l__exsheets_select_questions_bool
\seq_set_split:Nnn \l__exsheets_tmpa_seq { , } { #1 }
\seq_map_inline:Nn \l__exsheets_tmpa_seq
{
\bool_set_true:N \l__exsheets_questions_deactivate_bool
- \int_set_eq:NN \l__exsheets_tmpc_int \g__exsheets_questions_id_int
+ \int_set_eq:NN \l__exsheets_tmpc_int \g__exsheets_questions_id_int
\exsheets_file_input_if_exist:n { ##1 }
- \prop_length:NN
+ \__exsheets_prop_count:NN
\g__exsheets_selected_questions_prop
\l__exsheets_tmpa_int
\bool_if:NT \l__exsheets_questions_debug_bool
{
- \colorbox { exsheetsdebugcolor }
+ \exsheets_debug_box:nn
+ { \linewidth }
{
The~file~ ` \texttt { \tl_to_str:n { ##1 } } ' ~contains~
- \prop_length:N \g__exsheets_selected_questions_prop \c_space_tl
- questions.
+ \exsheets_prop_count:N \g__exsheets_selected_questions_prop
+ \c_space_tl questions~with~the~following~IDs:\par
+ \cs_set_protected:Npn \__exsheets_list_comma:
+ { \cs_set:Npn \__exsheets_list_comma: { ,~ } }
+ \prop_map_inline:Nn \g__exsheets_selected_questions_prop
+ { \__exsheets_list_comma: ####2 }
}
- \exsheets_par:
}
\bool_set_false:N \l__exsheets_questions_deactivate_bool
- \int_set_eq:NN \l__exsheets_tmpd_int \g__exsheets_questions_id_int
- \int_gset_eq:NN \g__exsheets_questions_id_int \l__exsheets_tmpc_int
+ \int_set_eq:NN \l__exsheets_tmpd_int \g__exsheets_questions_id_int
+ \int_gset_eq:NN \g__exsheets_questions_id_int \l__exsheets_tmpc_int
\__exsheets_select_question_random:n { ##1 }
+ \clist_gclear:N \questionsincludedlast
+ \bool_if:nTF
+ { \l__exsheets_include_random_bool || \l__exsheets_include_by_id_bool }
+ {
+ \clist_gset_eq:NN
+ \questionsincludedlast
+ \l__exsheets_include_id_clist
+ }
+ {
+ \prop_map_inline:Nn \g__exsheets_selected_questions_prop
+ {
+ \clist_if_in:NnF \l__exsheets_exclude_id_clist { ####2 }
+ { \clist_gput_right:Nn \questionsincludedlast { ####2 } }
+ }
+ }
\exsheets_file_input_if_exist:n { ##1 }
- \int_gset_eq:NN \g__exsheets_questions_id_int \l__exsheets_tmpd_int
- \prop_gclear:N \g__exsheets_selected_questions_prop
- \clist_clear:N \l__exsheets_include_id_clist
- \int_gzero:N \g__exsheets_selection_number_int
+ \int_gset_eq:NN \g__exsheets_questions_id_int \l__exsheets_tmpd_int
+ \prop_gclear:N \g__exsheets_selected_questions_prop
+ \clist_clear:N \l__exsheets_include_id_clist
+ \clist_clear:N \l__exsheets_exclude_id_clist
+ \int_gzero:N \g__exsheets_selection_number_int
}
\bool_set_false:N \l__exsheets_select_questions_bool
}
@@ -1463,22 +1439,31 @@
% - IDs=<list of IDs>
% - all=true|false % default when no option is given
% - random=<num>
+% - exclude=<list of IDs>
\keys_define:nn { exsheets / include }
{
- all .bool_set:N = \l__exsheets_include_all_bool ,
- IDs .code:n =
+ all .bool_set:N = \l__exsheets_include_all_bool ,
+ IDs .code:n =
\bool_set_false:N \l__exsheets_include_all_bool
\bool_set_false:N \l__exsheets_include_random_bool
+ \bool_set_true:N \l__exsheets_include_by_id_bool
\clist_set:Nn \l__exsheets_include_id_clist { #1 } ,
- random .code:n =
+ % the following option does _not_ set \l__exsheets_include_random_bool
+ % so it can be combined with the `random' option:
+ exclude .code:n =
+ \bool_set_false:N \l__exsheets_include_all_bool
+ \bool_set_false:N \l__exsheets_include_by_id_bool
+ \clist_set:Nn \l__exsheets_exclude_id_clist { #1 } ,
+ random .code:n =
\bool_set_false:N \l__exsheets_include_all_bool
\bool_set_true:N \l__exsheets_include_random_bool
+ \bool_set_false:N \l__exsheets_include_by_id_bool
\int_set:Nn \l__exsheets_include_random_int { #1 }
}
\int_new:N \g__exsheets_selection_number_int
-\cs_new:Npn \__exsheets_select_question:n #1
+\cs_new_protected:Npn \__exsheets_select_question:n #1
{
\bool_if:NT \l__exsheets_select_questions_bool
{
@@ -1506,8 +1491,7 @@
\l__exsheets_tmpa_int
\g__exsheets_selection_number_int
}
- \exp_args:NNx
- \prop_get:NnN \g__exsheets_selected_questions_prop
+ \prop_get:NxN \g__exsheets_selected_questions_prop
{ \int_use:N \l__exsheets_tmpa_int }
\l__exsheets_tmpa_tl
\bool_if:NF \l__exsheets_include_all_bool
@@ -1516,46 +1500,124 @@
}
}
\cs_generate_variant:Nn \__exsheets_select_question:n { V }
+\cs_generate_variant:Nn \prop_get:NnN { Nx }
-\cs_new:Npn \__exsheets_select_question_by_id:n #1
+\cs_new_protected:Npn \__exsheets_select_question_by_id:n #1
{
- \clist_if_in:NnTF
- \l__exsheets_include_id_clist
- { #1 }
- { \bool_gset_true:N \g__exsheets_questions_use_bool }
- { \bool_gset_false:N \g__exsheets_questions_use_bool }
+ \bool_if:nTF
+ { \l__exsheets_include_by_id_bool || \l__exsheets_include_random_bool }
+ {% parsing list of included IDs
+ \clist_if_in:NnTF
+ \l__exsheets_include_id_clist
+ { #1 }
+ { \bool_gset_true:N \g__exsheets_questions_use_bool }
+ { \bool_gset_false:N \g__exsheets_questions_use_bool }
+ }
+ {% parsing list of excluded IDs
+ \clist_if_in:NnTF
+ \l__exsheets_exclude_id_clist
+ { #1 }
+ { \bool_gset_false:N \g__exsheets_questions_use_bool }
+ { \bool_gset_true:N \g__exsheets_questions_use_bool }
+ }
}
\cs_generate_variant:Nn \__exsheets_select_question_by_id:n { V }
-% TODO: don't select questions whose topics or classes aren't chosen
-\cs_new:Npn \__exsheets_select_question_random:n #1
+\tl_new:N \l__exsheets_include_id_tl
+\bool_new:N \l__exsheets_use_selection_bool
+% TODO: poor efficiency -- there should be no need to map through
+% \l__exsheets_class_prop *two* times
+\cs_new_protected:Npn \__exsheets_select_question_random:n #1
{
\bool_if:NT \l__exsheets_include_random_bool
{
- \prop_length:NN \g__exsheets_selected_questions_prop \l__exsheets_tmpa_int
- \int_compare:nTF { \l__exsheets_include_random_int > \l__exsheets_tmpa_int }
+ % number of question in file:
+ \__exsheets_prop_count:NN
+ \g__exsheets_selected_questions_prop
+ \l__exsheets_tmpa_int
+ % number of selectable questions in file:
+ \int_zero:N \l__exsheets_tmpb_int
+ \prop_map_inline:Nn \g__exsheets_selected_questions_prop
+ {
+ \prop_map_inline:Nn \l__exsheets_class_prop
+ {
+ \bool_if:cT { g__exsheets_use_####1_bool }
+ {
+ \bool_set_true:N \l__exsheets_use_selection_bool
+ \prop_get:cnNT { g__exsheets_questions_####2_prop } { ##1 }
+ \l__exsheets_tmpa_tl
+ {
+ \prop_if_in:cVT { g__exsheets_####1_active_prop }
+ \l__exsheets_tmpa_tl
+ { \int_incr:N \l__exsheets_tmpb_int }
+ }
+ }
+ }
+ }
+ \int_compare:nTF { \l__exsheets_include_random_int >= \l__exsheets_tmpa_int }
{
- \msg_warning:nnxxx { exsheets } { random }
+ % not enough questions available:
+ \msg_warning:nnxxx { exsheets } { random-file }
{ \int_use:N \l__exsheets_include_random_int }
{ #1 }
{ \int_use:N \l__exsheets_tmpa_int }
\bool_set_true:N \l__exsheets_include_all_bool
}
{
- \int_zero:N \l__exsheets_tmpb_int
- \int_do_while:nn { \l__exsheets_tmpb_int < \l__exsheets_include_random_int }
+ \bool_if:nTF
{
- \pgfmathparse { random(\int_use:N \l__exsheets_tmpa_int) }
- \tl_set_eq:NN \l__exsheets_tmpa_tl \pgfmathresult
- \prop_get:NVN \g__exsheets_selected_questions_prop
- \l__exsheets_tmpa_tl
- \l__exsheets_tmpb_tl
- \clist_if_in:NVF \l__exsheets_include_id_clist \l__exsheets_tmpb_tl
+ \int_compare_p:n
+ { \l__exsheets_include_random_int >= \l__exsheets_tmpb_int }
+ &&
+ \l__exsheets_use_selection_bool
+ }
+ {
+ % not enough questions selectable:
+ \msg_warning:nnxxxx { exsheets } { random-selectable }
+ { \int_use:N \l__exsheets_include_random_int }
+ { #1 }
+ { \int_use:N \l__exsheets_tmpa_int }
+ { \int_use:N \l__exsheets_tmpb_int }
+ \bool_set_true:N \l__exsheets_include_all_bool
+ }
+ {
+ \int_zero:N \l__exsheets_tmpb_int
+ \int_do_while:nn
+ { \l__exsheets_tmpb_int < \l__exsheets_include_random_int }
{
- \clist_put_right:NV
- \l__exsheets_include_id_clist
+ \pgfmathparse { random(\int_use:N \l__exsheets_tmpa_int) }
+ \tl_set_eq:NN \l__exsheets_tmpa_tl \pgfmathresult
+ \prop_get:NVN \g__exsheets_selected_questions_prop
+ \l__exsheets_tmpa_tl
\l__exsheets_tmpb_tl
- \int_incr:N \l__exsheets_tmpb_int
+ \clist_if_in:NVF \l__exsheets_include_id_clist \l__exsheets_tmpb_tl
+ {
+ \tl_clear:N \l__exsheets_include_id_tl
+ \prop_map_inline:Nn \l__exsheets_class_prop
+ {
+ \prop_get:cVNT { g__exsheets_questions_##2_prop }
+ \l__exsheets_tmpa_tl \l__exsheets_tmpc_tl
+ {
+ \bool_if:cT { g__exsheets_use_##1_bool }
+ {
+ \prop_if_in:cVTF { g__exsheets_##1_active_prop }
+ \l__exsheets_tmpc_tl
+ { \tl_put_right:Nn \l__exsheets_include_id_tl { y } }
+ { \tl_put_right:Nn \l__exsheets_include_id_tl { n } }
+ }
+ }
+ }
+ \tl_if_in:NnF \l__exsheets_include_id_tl { n }
+ {
+ \clist_if_in:NVF \l__exsheets_exclude_id_clist \l__exsheets_tmpb_tl
+ {
+ \clist_put_right:NV
+ \l__exsheets_include_id_clist
+ \l__exsheets_tmpb_tl
+ \int_incr:N \l__exsheets_tmpb_int
+ }
+ }
+ }
}
}
}
@@ -1592,7 +1654,7 @@
\tl_new:N \l__exsheets_solutions_name_tl
\tl_set:Nn \l__exsheets_solutions_name_tl { Solution }
-\cs_new:Npn \__exsheets_save_solution:n #1
+\cs_new_protected:Npn \__exsheets_save_solution:n #1
{
% save for later use
\bool_if:NTF \l__exsheets_include_all_bool
@@ -1630,20 +1692,38 @@
\NewEnviron { __exsheets_solution_internal: }
{
- \bool_if:nT { \g__exsheets_questions_use_bool && \l__exsheets_solutions_use_bool }
- {
-% \cspreto { BODY } { \ifhmode \fi }% what's that good for?
- \__exsheets_save_solution:V \BODY
- }
+ \bool_if:nT
+ { \g__exsheets_questions_use_bool && \l__exsheets_solutions_use_bool }
+ { \__exsheets_save_solution:V \BODY }
}
\bool_new:N \l__exsheets_inside_solution_bool
\bool_set_false:N \l__exsheets_inside_solution_bool
+\tl_new:N \l__exsheets_use_solution_tl
+
\NewDocumentEnvironment { __exsheets_solution: } { g }
{
- \__exsheets_solutions_use_classes:
- \__exsheets_solutions_use_topics:
+ \tl_clear:N \l__exsheets_use_solution_tl
+ \prop_map_inline:Nn \l__exsheets_class_prop
+ {
+ \use:c { __exsheets_solutions_use_##1: }
+ \bool_if:nTF
+ {
+ (
+ \l__exsheets_solutions_use_bool
+ &&
+ \bool_if_p:c { l__exsheets_##2_active_bool }
+ )
+ ||
+ ! \bool_if_p:c { g__exsheets_use_##1_bool }
+ }
+ { \tl_put_right:Nn \l__exsheets_use_solution_tl { y } }
+ { \tl_put_right:Nn \l__exsheets_use_solution_tl { n } }
+ }
+ % verwende, wenn ein Ja dabei war:
+ \tl_if_in:NnT \l__exsheets_use_solution_tl { y }
+ { \bool_set_true:N \l__exsheets_solutions_use_bool }
\bool_if:NT \l__exsheets_questions_deactivate_bool
{ \bool_set_false:N \l__exsheets_solutions_use_bool }
\bool_if:NT \l__exsheets_solutions_use_bool
@@ -1687,7 +1767,7 @@
% ----------------------------------------------------------------------------
% print solutions:
% save section / chapter counter:
-\cs_new:Npn \__exsheets_exlabel:n #1
+\cs_new_protected:Npn \__exsheets_exlabel:n #1
{
\@bsphack
\iow_now:Nx \@auxout
@@ -1739,7 +1819,7 @@
{ \exsheets_print_solutions:n { #1 } }
% internal command:
-\cs_new:Npn \exsheets_print_solutions:n #1
+\cs_new_protected:Npn \exsheets_print_solutions:n #1
{
\group_begin:
\bool_set_true:N \l__exsheets_solutions_print_bool
@@ -1767,7 +1847,7 @@
\int_new:N \l__exsheets_counter_sec_int
\int_new:N \l__exsheets_counter_qu_int
-\cs_new:Npn \__exsheets_get_sectioning_numbers:
+\cs_new_protected:Npn \__exsheets_get_sectioning_numbers:
{
\cs_if_exist:NT \chapter
{ \int_set:Nn \l__exsheets_counter_ch_int { \arabic{chapter} } }
@@ -1821,7 +1901,7 @@
}
}
-\cs_new:Npn \__exsheets_print_solutions_by_section:w #1-#2-#3 \q_stop
+\cs_new_protected:Npn \__exsheets_print_solutions_by_section:w #1-#2-#3 \q_stop
{
% wenn #3=-, dann range-Input
\tl_if_eq:nnTF { #3 } { - }
@@ -1879,7 +1959,7 @@
}
}
-\cs_new:Npn \__exsheets_print_solutions_by_chapter:w #1-#2-#3 \q_stop
+\cs_new_protected:Npn \__exsheets_print_solutions_by_chapter:w #1-#2-#3 \q_stop
{
% wenn #3=-, dann range-Input
\tl_if_eq:nnTF { #3 } { - }
@@ -1924,7 +2004,7 @@
\__exsheets_print_solutions_all:nn
}
-\cs_new:Npn \__exsheets_print_solutions_all:nn #1#2
+\cs_new_protected:Npn \__exsheets_print_solutions_all:nn #1#2
{
\__exsheets_read_number:w #2 \q_stop
\prop_get:NnNT \g__exsheets_solutions_names_prop
@@ -1953,7 +2033,7 @@
% print by ID:
\seq_new:N \l__exsheets_solutions_byID_seq
-\cs_new:Npn \exsheets_print_solutions_byID:n #1
+\cs_new_protected:Npn \exsheets_print_solutions_byID:n #1
{
\seq_set_split:Nnn \l__exsheets_solutions_byID_seq { , } { #1 }
\seq_clear:N \l__exsheets_tmpa_seq
@@ -2089,13 +2169,11 @@
\NewDocumentCommand \NewQuSolPair { mO{}mO{} }
{ \__exsheets_new_qu_sol_pair:nnnn { #1 } { #2 } { #3 } { #4 } }
-\@onlypreamble\NewQuSolPair
+\@onlypreamble \NewQuSolPair
\NewDocumentCommand \RenewQuSolPair { mO{}mO{} }
{ \__exsheets_renew_qu_sol_pair:nnnn { #1 } { #2 } { #3 } { #4 } }
-\@onlypreamble\RenewQuSolPair
-
-\NewQuSolPair { question } { solution }
+\@onlypreamble \RenewQuSolPair
% ----------------------------------------------------------------------------
% the `tasks' list
@@ -2163,7 +2241,7 @@
\group_end:
}
-\cs_new:Npn \exsheets_blank:n #1
+\cs_new_protected:Npn \exsheets_blank:n #1
{
\box_clear:N \l__exsheets_blank_box
\hbox_set:Nn \l__exsheets_blank_box { #1 }
@@ -2179,7 +2257,7 @@
}
}
-\cs_new:Npn \__exsheets_blank_skip:N #1
+\cs_new_protected:Npn \__exsheets_blank_skip:N #1
{
\bool_if:NTF \l__exsheets_blank_width_bool
{ \dim_set:Nn \l__exsheets_tmpa_dim { #1 } }
@@ -2237,7 +2315,7 @@
% ----------------------------------------------------------------------------
% \examspace
% insert space for a student to answer a question
-\cs_new:Npn \__exsheets_examspace:nn #1#2
+\cs_new_protected:Npn \__exsheets_examspace:nn #1#2
{
\par \tex_penalty:D -100 \scan_stop:
\group_begin:
@@ -2268,6 +2346,23 @@
}
% ----------------------------------------------------------------------------
+% default definitions:
+% question / solution pair:
+\NewQuSolPair{question}{solution}
+
+% properties:
+\DeclareQuestionProperty{points}
+\bool_if:NT \l__exsheets_auto_label_bool
+ {
+ \DeclareQuestionProperty{ref}
+ \DeclareQuestionProperty{pageref}
+ }
+
+% classs:
+\DeclareQuestionClass{class}{classes}
+\DeclareQuestionClass{topic}{topics}
+
+% ----------------------------------------------------------------------------
% Sprachanpassungen
\file_if_exist:nT { translations.sty }
{
@@ -2330,7 +2425,7 @@
\iow_now:Nx \@auxout
{
\exp_not:N \exsheets@sum@of@points
- { \fp_eval:n { \g__exsheets_points_sum_fp } }
+ { \fp_eval:n { \g__exsheets_points_sum_fp } }^^J
\exp_not:N \exsheets@sum@of@bonus
{ \fp_eval:n { \g__exsheets_bonus_sum_fp } }
}
@@ -2432,9 +2527,24 @@ HISTORY:
2013/01/21 v0.7a - added option `auto-label' and questions key `label',
also added question properties `ref' and `pageref'
2013/02/17 v0.7b - bug fix: question selection by ID now works again
-
+2013/03/?? v0.8 - \prop_length => \exsheets_prop_count
+ - define unexpandable internal commands protected
+ - translations basic dictionaries for English, German,
+ French and Spanish
+ - translations: new command \DeclareDictTranslation
+ - new \includequestions option `exclude'
+ - new way of handling the `class' of questions:
+ instead of hard-coded `classes' and `topics'
+ individual groups like e.g. `difficulties' can be
+ chosen; `classes' and `topics' are still provided for
+ backwards compatibility; this introduces the new
+ command \DeclareQuestionClass
+ - minor changes to the debugging information layout
+ - bug fix in number saving mechanism
+ - \includequestions[random=<num>] now obeys class
+ as done with \SetupExSheets{use-topics={foo,bar}}
+ - new macro \questionsincludedlast
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
- points/decimal-marker, points/frac (?), points/format (?,im interface)
-- rewrite random selection
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
index f81c8e4344d..66dbffcb590 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
@@ -259,7 +259,7 @@
{ \tl_use:N \l__exsheets_heading_post_code_tl }
\coffin_join:NnnNnnnn
\l__exsheets_heading_main_coffin { l } { t }
- \l__exsheets_heading_pre_coffin { l } { b } { 0pt } { 0pt }
+ \l__exsheets_heading_pre_coffin { l } { b } { 0pt } { 0pt }
\coffin_join:NnnNnnnn
\l__exsheets_heading_main_coffin { l } { b }
\l__exsheets_heading_post_coffin { l } { t } { 0pt } { 0pt }
@@ -267,7 +267,6 @@
{
\tl_use:N \l__exsheets_heading_title_format_tl
\strut
- \exsheets_questions_debug:
\tl_use:N \l__exsheets_heading_title_pre_code_tl
{ \tl_use:N \l__exsheets_heading_title_user_format_tl #1 }
\tl_use:N \l__exsheets_heading_title_post_code_tl
@@ -349,7 +348,8 @@
}
\__exsheets_join:N \l__exsheets_heading_joined_coffins_seq
\__exsheets_attach:N \l__exsheets_heading_attached_coffins_seq
- \bool_if:NF \l__exsheets_heading_inline_bool
+ \bool_if:NTF \l__exsheets_heading_inline_bool
+ { \exsheets_questions_debug: }
{
\skip_vertical:N \l__exsheets_heading_above_dim
\exsheets_needspace:n
@@ -359,6 +359,7 @@
\l__exsheets_heading_below_dim +
\baselineskip
}
+ \exsheets_questions_debug:
\noindent
}
\skip_set:Nn \parfillskip { 0pt plus 1fil }
diff --git a/Master/texmf-dist/tex/latex/exsheets/translations.sty b/Master/texmf-dist/tex/latex/exsheets/translations.sty
index 143a1ab2688..aef8ad16d6f 100644
--- a/Master/texmf-dist/tex/latex/exsheets/translations.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/translations.sty
@@ -29,8 +29,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\def\@trnslt@date{2012/12/23}
-\def\@trnslt@version{v0.6}
+\def\@trnslt@date{2013/03/10}
+\def\@trnslt@version{v0.8}
\ProvidesPackage{translations}[\@trnslt@date\space \@trnslt@version\space a simple translator]
\RequirePackage{etoolbox}
@@ -272,6 +272,11 @@
{\@trnslt@dictionary@name-\@trnslt@dictionary@lang.trsl}%
[(\@trnslt@dictionary@lang\space translation file `\@trnslt@dictionary@name') #1]}
+% \@trnslt@dictionary@language
+\newrobustcmd*\DeclareDictTranslation[2]{%
+ \@trnslt@declare@translation{#1}{\@trnslt@dictionary@language}{#2}}
+\@onlypreamble\DeclareDictTranslation
+
% --------------------------------------------------------------------------
% predefined languages
\DeclareLanguage{albanian}
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 09510ea49ef..e37f18c98a3 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -1303,6 +1303,7 @@ $standardtex='\.(.bx|cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$';
'easy', 'easy.*\.sty', # no mydoc.sty
'ecv', '\.sty|\.cls|\.ldf', # no docstrip.cfg, else system-wide
'edmac', 'edmac.tex|edstanza.tex|\.sty',
+ 'exsheets', 'dicts|' . $standardtex,
'eijkhout', '\.tex',
'einfuehrung', 'NULL', # doc package
'eltex', 'eltex.*tex',