summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-24 23:27:10 +0000
committerKarl Berry <karl@freefriends.org>2012-10-24 23:27:10 +0000
commit0e06b454144b2b566f5889836e1605d9cade581a (patch)
tree834a28bb5cb9875b65c52c4722126b6559aacdd4 /Master/texmf-dist
parent26a54db94560dd44a149728ce558d1882d9f6beb (diff)
exsheets (24oct12)
git-svn-id: svn://tug.org/texlive/trunk@28067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/README2
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdfbin681099 -> 689795 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex167
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/grading-table.pdfbin0 -> 26403 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/grading-table.tex22
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/cntformats.sty4
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets.sty145
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/translations.sty4
8 files changed, 308 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README
index 4ac38eeb800..74803b4238a 100644
--- a/Master/texmf-dist/doc/latex/exsheets/README
+++ b/Master/texmf-dist/doc/latex/exsheets/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-EXSHEETS v0.2b - 2012/10/08
+EXSHEETS v0.3 - 2012/10/23
bundled packages:
the EXSHEETS package
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
index 8125d021770..502693a22cf 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 f8e2eefd934..e9fb998099b 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
@@ -43,7 +43,6 @@
%
% use `xelatex' and `biber' for compilation
%
-\RequirePackage{setspace}
\documentclass[DIV10,toc=index,toc=bib,numbers=noendperiod]{cnpkgdoc}
% ----------------------------------------------------------------------------
% document layout and typographic features
@@ -59,7 +58,8 @@
skipbelow = .6\baselineskip plus .5ex minus .5ex ,
skipabove = .6\baselineskip plus .5ex minus .5ex ,
innerleftmargin = 1.5em ,
- innerrightmargin = 2.5em
+ innerrightmargin = 2.5em ,
+ ignorelastdescenders
} ,
gobble = 1
}
@@ -88,12 +88,14 @@
\addcmds{
acs, addpoints, blank, bigstar, bottomrule, citetitle, cmd, color,
DeclareInstance, DeclareTemplateInterface, DeclareQuestionProperty,
- DebugExSheets, endspacing, GetQuestionProperty, grade, includequestions,
- midrule, points, PrintIfIncludeActiveF, PrintIfIncludeActiveT,
- PrintIfIncludeActiveTF, printsolutions, PrintSolutionsTF,
- QuestionNumber, s, sample, setlength, SetQuestionProperties, SetupExSheets,
- spacing, square, sumpoints, tabcolsep, task, textcite, textcolor, toprule,
- totalpoints
+ DebugExSheets, endspacing, examspace, ForEachQuestion, GetQuestionProperty,
+ grade, includequestions, iflastquestion,
+ midrule, NewQuSolPair, numberofquestions, points, PrintIfIncludeActiveF,
+ PrintIfIncludeActiveT, PrintIfIncludeActiveTF, printsolutions,
+ PrintSolutionsTF,
+ QuestionNumber, RenewQuSolPair, s, sample, setlength, SetQuestionProperties,
+ SetupExSheets, spacing, square, sumpoints, tabcolsep, task, textcite, textcolor,
+ toprule, totalpoints
}
% translations:
@@ -211,6 +213,11 @@
4 = .5
}
+\usepackage{amssymb}
+\NewQuSolPair
+ {question*}[name=\llap{$\bigstar$\space}Bonus Question]
+ {solution*}[name=\llap{$\bigstar$\space}Solution]
+
\DeclareTranslation{English}{Kueche}{kitchen}
\DeclareTranslation{German}{Kueche}{K\"uche}
\DeclareTranslation{Spanish}{Kueche}{cocina}
@@ -246,6 +253,22 @@
\expsign
\gdef\cnpkgdoctriangle{\unexpsign}}}
+\usepackage{marginnote}
+\makeatletter
+\newcommand*\sinceversion[1]{%
+ \@bsphack
+ \marginnote{%
+ \footnotesize\sffamily\RaggedRight
+ \textcolor{black!75}{Introduced in version~#1}}%
+ \@esphack}
+\newcommand*\changedversion[1]{%
+ \@bsphack
+ \marginnote{%
+ \footnotesize\sffamily\RaggedRight
+ \textcolor{black!75}{Changed in version~#1}}%
+ \@esphack}
+\makeatother
+
% ----------------------------------------------------------------------------
% title page
\TitlePicture{%
@@ -475,6 +498,15 @@ argument.
\end{question}
\end{beispiel}
+\sinceversion{3.0}On additional thing: you might want to define custom
+commands that should behave differently if they're inside or outside of the
+\code{question} environment. In this case you can use these commands:
+\begin{beschreibung}
+ \expandable\Befehl{IfInsideQuestionTF}{<true code>}\ma{<false code>}
+ \expandable\Befehl{IfInsideQuestionT}{<true code>}
+ \expandable\Befehl{IfInsideQuestionF}{<false code>}
+\end{beschreibung}
+
\subsubsection{Options to the \code{question} Environment}\secidx[options]{questions}
The \code{question} environment takes one or more of the following options:
\begin{beschreibung}
@@ -649,10 +681,11 @@ and a number of commands to retrieve the sum of points and/or bonus points.
\currentbonussum
\Befehl{totalpoints}*\newline
prints the sum of the points \emph{and} the sum of the bonus points with ``unit'':
- \totalpoints
+ \totalpoints\space
The starred version prints the sum of the points without ``unit'': \totalpoints*.
\end{beschreibung}
-The last three commands need at least \emph{two} \LaTeX\ runs to get the sum right.
+The commands \cmd{pointssum}, \cmd{bonussum} and \cmd{totalpoints} need at least
+\emph{two} \LaTeX\ runs to get the sum right.
Suppose you have an exercise worth \points{4} which consists of four questions
listed with an \code{enumerate} environment that are all worth \points{1} each.
@@ -1067,6 +1100,45 @@ It is now possible to recover these values later:
\end{center}
\end{beispiel}
+\sinceversion{3.0}There are additional commands that might prove useful:
+\begin{beschreibung}
+ \Befehl{ForEachQuestion}{<code to be executed for each used question>}\newline
+ Inside the argument one can refer to the \ac{id} of a question with \code{\#1}.
+ Beware that this command only knows of questions used before it is issued.
+ \expandable\Befehl{numberofquestions}\newline
+ Returns the current number of used questions. Beware that this command only knows
+ of questions used before it is issued.
+ \expandable\Befehl{iflastquestion}{<true code>}\ma{<false code>}\newline
+ Although this command is available in the whole document it is only useful
+ inside \cmd{ForEachQuestion}. It tells you if the end of the loop is reached
+ or not.
+\end{beschreibung}
+For example one could use these commands to create a grading table:
+\begin{beispiel}[code only]
+ \begin{tabular}{|l|*{\numberofquestions}{c|}c|}\hline
+ Question &
+ \ForEachQuestion{\QuestionNumber{#1}\iflastquestion{}{&}} &
+ Total \\ \hline
+ Points &
+ \ForEachQuestion{\GetQuestionProperty{points}{#1}\iflastquestion{}{&}} &
+ \pointssum* \\ \hline
+ Reached &
+ \ForEachQuestion{\iflastquestion{}{&}} & \\ \hline
+\end{tabular}
+\end{beispiel}
+For four questions the table now would look similar to figure~\ref{fig:grading-table}.
+
+\begin{figure}[ht]
+ \centering
+ \begin{tabular}{|l|*{4}{c|}c|}\hline
+ Question & 1. & 2. & 3. & 4. & Total \\ \hline
+ Points & 3 & 5 & 10 & 8 & 26 \\ \hline
+ Reached & & & & & \\ \hline
+ \end{tabular}
+ \caption{An example for a grading table. (Actually this is a fake. See the
+ \code{grading-table.tex} file shipped with exsheets for the real use case.)}
+ \label{fig:grading-table}
+\end{figure}
\secidx*{Additional Information to Questions}
\subsection{Selectively Include Questions from External Files}\label{sec:include}
@@ -1137,6 +1209,38 @@ not taken into consideration. In fact it is completely ignored and the questions
are included anyway. I'm still not sure this is a feature or a bug\ldots
\secidx*{Include from External Files}
+\subsection{Own Question/Solution Pairs}
+\noindent\sinceversion{3.0}\ExSheets provides he possibility to create new
+environments that behave like the \code{question} and \code{solution} environments.
+This would allow, for example, to define a \code{question*}/\code{solution*}
+environment pair for bonus questions. The following commands may be used in the
+document preamble:
+\begin{beschreibung}
+ \Befehl{NewQuSolPair}{<question>}\oa{<question options>}\ma{<solution>}\oa{<solution options>}
+ \Befehl{RenewQuSolPair}{<question>}\oa{<question options>}\ma{<solution>}\oa{<solution options>}
+\end{beschreibung}
+The standard environments are defined as follows:
+\begin{beispiel}[code only]
+ \NewQuSolPair{question}{solution}
+\end{beispiel}
+
+Let's say we want the possibility to add bonus questions. A simple way would be
+to define starred variants that add a star in the margin left to the title:
+\begin{beispiel}
+ % preamble:
+ % \NewQuSolPair
+ % {question*}[name=\llap{$\bigstar$\space}Bonus Question]
+ % {solution*}[name=\llap{$\bigstar$\space}Solution]
+ \begin{question*}
+ This is a bonus question.
+ \end{question*}
+ \begin{solution*}[print]
+ This is what the solution looks like.
+ \end{solution*}
+\end{beispiel}
+As you can see the environments take the same options as are described for the
+standard \code{question} and \code{solution} environments.
+
\subsection{The \code{tasks} Environment}\label{sec:tasks}\secidx{tasks}
\subsubsection{How it works}
The \code{tasks} environment is similar to a list like \code{enumerate} but not
@@ -1265,14 +1369,18 @@ in one of the tasks. This will temporarily overwrite the default label.
\secidx*{tasks}
\subsection{Filling in the Blanks}\secidx{Blanks}
-Both in exercise sheets and in exams it is sometimes desirable to be able to
-create \blank{blanks} that have to be filled in. Or may be some more lines:
-\blank[width=5\linewidth]{}
+\subsubsection{Cloze}\secidx[Cloze]{Blanks}
+\noindent\changedversion{3.0}Both in exercise sheets and in exams it is sometimes
+desirable to be able to create \blank{blanks} that have to be filled in. Or may
+be some more lines: \blank[width=5\linewidth]{}
\begin{beschreibung}
- \Befehl{blank}[<options>]{<text to be filled in>}\newline
+ \Befehl{blank}*[<options>]{<text to be filled in>}\newline
creates a blank in normal text or in a question but fills the text of its
- argument if inside a solution.
+ argument if inside a solution. If used at the \emph{begin of a paragraph}
+ \cmd{blank} will do two things: it will set the linespread according to an
+ option explained below and will insert \cmd*{par} after the lines. If you
+ don't want that use the starred version.
\end{beschreibung}
The options are these:
@@ -1281,6 +1389,9 @@ The options are these:
The style of the line.
\Option[blank]{width}{<dim>}\Default{}
The width of the line. If it is not used the width of the filled in text is used.
+ \Option[blank]{linespread}{<num>}\Default{1}
+ Set the linespread for the blank lines. This only has an effect if \cmd{blank}
+ is used at the begin of a paragraph.
\end{beschreibung}
\begin{beispiel}
\begin{question}
@@ -1296,8 +1407,30 @@ The options are these:
\end{beispiel}
A number of empty lines are easily created by setting the width option:
\begin{beispiel}
- % \usepackage{setspace}
- \spacing{2}\blank[width=4.8\linewidth]{}\endspacing
+
+ \blank[width=4.8\linewidth,linespread=1.5]{}
+\end{beispiel}
+
+\subsubsection{Vertical Space for answers}\secidx[vertical space]{Blanks}
+\noindent\sinceversion{3.0}When you're creating an exam you might want to add some
+vertical space where the students can write down their answers. While you can
+always use \cmd*{vspace} this is not always handy when the space left on the
+page is less than you want. In this case it would be nice if a) there would be
+no warning and b) the rest of the space would be added at the top of the next
+page. This is what the following command is for:
+\begin{beschreibung}
+ \Befehl{examspace}*{<dim>}\newline
+ Add space as specified in \ma{<dim>}. If the space available on the current
+ page is not enough the rest of the space will be added at the top of the
+ next page. The starred version will silently drop any leftover space instead
+ of adding it to the next page.
+\end{beschreibung}
+\begin{beispiel}
+ \begin{question}
+ What do you think of this feature?
+ \examspace{3cm}
+ \end{question}
+ This line comes after the space.
\end{beispiel}
\secidx*{Blanks}
diff --git a/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf b/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf
new file mode 100644
index 00000000000..424286f0916
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/exsheets/grading-table.tex b/Master/texmf-dist/doc/latex/exsheets/grading-table.tex
new file mode 100644
index 00000000000..85239f69181
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/exsheets/grading-table.tex
@@ -0,0 +1,22 @@
+\documentclass{scrartcl}
+\usepackage{exsheets}
+\DeclareQuestionProperty{points}
+
+\begin{document}
+
+\begin{question}{3}\SetQuestionProperties{points=3}
+\end{question}
+\begin{question}{5}\SetQuestionProperties{points=5}
+\end{question}
+\begin{question}{10}\SetQuestionProperties{points=10}
+\end{question}
+\begin{question}{8}\SetQuestionProperties{points=8}
+\end{question}
+
+\begin{tabular}{|l|*{\numberofquestions}{c|}c|}\hline
+ Question & \ForEachQuestion{\QuestionNumber{#1}\iflastquestion{}{&}} & Total \\ \hline
+ Points & \ForEachQuestion{\GetQuestionProperty{points}{#1}\iflastquestion{}{&}} & \pointssum* \\ \hline
+ Reached & \ForEachQuestion{\iflastquestion{}{&}} & \\ \hline
+\end{tabular}
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/exsheets/cntformats.sty b/Master/texmf-dist/tex/latex/exsheets/cntformats.sty
index 41e4cef75d3..df81ccb7c1b 100644
--- a/Master/texmf-dist/tex/latex/exsheets/cntformats.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/cntformats.sty
@@ -29,8 +29,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\def\cntfmts@date{2012/10/08}
-\def\cntfmts@version{v0.2b}
+\def\cntfmts@date{2012/10/23}
+\def\cntfmts@version{v0.3}
\ProvidesPackage{cntformats}[\cntfmts@date\space \cntfmts@version\space A different way to read counters.]
\RequirePackage{etoolbox,xparse}
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index db748f1baf5..54c803127f2 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{2012/10/08}
-\def\exsheets@version{0.2b}
+\def\exsheets@date{2012/10/23}
+\def\exsheets@version{0.3}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -800,6 +800,13 @@
\int_new:N \g__exsheets_questions_id_int
\int_gzero:N \g__exsheets_questions_id_int
+\cs_new:Npn \IfInsideQuestionTF
+ { \bool_if:NTF \l__exsheets_inside_question_bool }
+\cs_new:Npn \IfInsideQuestionT
+ { \bool_if:NT \l__exsheets_inside_question_bool }
+\cs_new:Npn \IfInsideQuestionF
+ { \bool_if:NF \l__exsheets_inside_question_bool }
+
\NewEnviron { __exsheets_questions_internal: }
{
\cspreto { BODY } { \ifhmode \vspace*{0pt} \fi }
@@ -822,6 +829,8 @@
}
\prop_new:N \g__exsheets_questions_id_prop
+\prop_new:N \g__exsheets_questions_used_prop
+\int_new:N \g__exsheets_questions_used_int
\tl_new:N \l__exsheets_questions_id_tl
\tl_new:N \g__exsheets_questions_current_id_tl
@@ -845,7 +854,7 @@
\cs_new:Npn \__exsheets_read_points:n #1
{ \__exsheets_read_points:w #1++ \q_stop }
-\NewDocumentEnvironment { question } { og }
+\NewDocumentEnvironment { __exsheets_question: } { gg }
{
\bool_set_true:N \l__exsheets_inside_question_bool
\bool_if:NT \l__exsheets_questions_use_bool
@@ -871,6 +880,13 @@
\prop_gput:NVV \g__exsheets_questions_id_prop
\g__exsheets_questions_id_int
\g__exsheets_questions_id_int
+ \bool_if:NT \l__exsheets_questions_use_bool
+ {
+ \prop_gput:NVV \g__exsheets_questions_used_prop
+ \g__exsheets_questions_id_int
+ \g__exsheets_questions_id_int
+ \int_gincr:N \g__exsheets_questions_used_int
+ }
\tl_gset:Nx \g__exsheets_questions_current_id_tl
{ \int_use:N \g__exsheets_questions_id_int }
}
@@ -878,6 +894,13 @@
\prop_gput:NVV \g__exsheets_questions_id_prop
\l__exsheets_questions_id_tl
\g__exsheets_questions_id_int
+ \bool_if:NT \l__exsheets_questions_use_bool
+ {
+ \prop_gput:NVV \g__exsheets_questions_used_prop
+ \l__exsheets_questions_id_tl
+ \g__exsheets_questions_id_int
+ \int_gincr:N \g__exsheets_questions_used_int
+ }
\tl_gset:Nx \g__exsheets_questions_current_id_tl
{ \tl_use:N \l__exsheets_questions_id_tl }
}
@@ -1142,6 +1165,23 @@
{ \prop_get:cn { g__exsheets_question_property_#1_prop } { #2 } }
}
+\int_new:N \g__exsheets_tmpa_int
+\cs_new:Npn \ForEachQuestion #1
+ {
+ \int_gzero:N \g__exsheets_tmpa_int
+ \prop_map_inline:Nn \g__exsheets_questions_used_prop
+ { \int_gincr:N \g__exsheets_tmpa_int #1 }
+ }
+
+\cs_new:Npn \iflastquestion
+ {
+ \int_compare:nTF
+ { \g__exsheets_questions_used_int = \g__exsheets_tmpa_int }
+ }
+
+\cs_new:Npn \numberofquestions
+ { \int_use:N \g__exsheets_questions_used_int }
+
% ----------------------------------------------------------------------------
% debug-Info:
\bool_new:N \l__exsheets_questions_debug_bool
@@ -1396,7 +1436,7 @@
\cs_generate_variant:Nn \prop_gput:Nnn { Nff,Nfx,Nfn,Nxx }
\cs_generate_variant:Nn \__exsheets_save_solution:n { V }
-\NewEnviron { __exsheets_solution_int: }
+\NewEnviron { __exsheets_solution_internal: }
{
\bool_if:nT { \g__exsheets_questions_use_bool && \l__exsheets_solutions_use_bool }
{
@@ -1408,7 +1448,7 @@
\bool_new:N \l__exsheets_inside_solution_bool
\bool_set_false:N \l__exsheets_inside_solution_bool
-\NewDocumentEnvironment { solution } { o }
+\NewDocumentEnvironment { __exsheets_solution: } { g }
{
\__exsheets_solutions_use_classes:
\__exsheets_solutions_use_topics:
@@ -1419,9 +1459,9 @@
\bool_set_true:N \l__exsheets_inside_solution_bool
\IfNoValueF { #1 } { \keys_set:nn { exsheets / solution } { #1 } }
}
- \__exsheets_solution_int:
+ \__exsheets_solution_internal:
}
- { \end__exsheets_solution_int: }
+ { \end__exsheets_solution_internal: }
\bool_new:N \l__exsheets_solutions_runin_bool
\bool_set_false:N \l__exsheets_solutions_runin_bool
@@ -1479,8 +1519,8 @@
\cs_if_exist:cTF { r@#1 }
{ \__exsheets_ref_aux:n { #1 } }
{
+ 1\relax
\protect\G@refundefinedtrue
- 1
\@latex@warning{exlabel `#1' on page \thepage \space undefined}%
}
}
@@ -1798,6 +1838,38 @@
}
% ----------------------------------------------------------------------------
+% create question/solution pairs
+\cs_new:Npn \__exsheets_new_qu_sol_pair:nnnn #1#2#3#4
+ {
+ \NewDocumentEnvironment { #1 } { O{}G{} }
+ { \__exsheets_question: {#2,##1} {##2} }
+ { \end__exsheets_question: }
+ \NewDocumentEnvironment { #3 } { O{} }
+ { \__exsheets_solution: {#4,##1} }
+ { \end__exsheets_solution: }
+ }
+
+\cs_new:Npn \__exsheets_renew_qu_sol_pair:nnnn #1#2#3#4
+ {
+ \RenewDocumentEnvironment { #1 } { O{}G{} }
+ { \__exsheets_question: {#2,##1} {##2} }
+ { \end__exsheets_question: }
+ \RenewDocumentEnvironment { #3 } { O{} }
+ { \__exsheets_solution: {#4,##1} }
+ { \end__exsheets_solution: }
+ }
+
+\NewDocumentCommand \NewQuSolPair { mO{}mO{} }
+ { \__exsheets_new_qu_sol_pair:nnnn { #1 } { #2 } { #3 } { #4 } }
+\@onlypreamble\NewQuSolPair
+
+\NewDocumentCommand \RenewQuSolPair { mO{}mO{} }
+ { \__exsheets_renew_qu_sol_pair:nnnn { #1 } { #2 } { #3 } { #4 } }
+\@onlypreamble\RenewQuSolPair
+
+\NewQuSolPair { question } { solution }
+
+% ----------------------------------------------------------------------------
% the `tasks' list
\input { exsheets_tasks.def }
\bool_if:NT \l__exsheets_load_tasks_bool
@@ -1810,10 +1882,13 @@
% the \blank{<words>} command
\RequirePackage { ulem } \normalem
\dim_new:N \l__exsheets_blank_dim
+\tl_new:N \l__exsheets_blank_linespread_tl
+\tl_set:Nn \l__exsheets_blank_linespread_tl { 1 }
\box_new:N \l__exsheets_blank_box
\bool_new:N \l__exsheets_blank_width_bool
+\bool_new:N \l__exsheets_blank_linespread_bool
-\cs_new_nopar:Npn \exsheets_write_blank:n #1 { #1 }
+\cs_new:Npn \exsheets_write_blank:n #1 { #1 }
\cs_set_eq:NN \exsheets_write_blank:n \uline
\keys_define:nn { exsheets / blank }
@@ -1833,14 +1908,28 @@
{
\bool_set_true:N \l__exsheets_blank_width_bool
\dim_set:Nn \l__exsheets_blank_dim { #1 }
- }
+ } ,
+ linespread .code:n =
+ \bool_set_true:N \l__exsheets_blank_linespread_bool
+ \tl_set:Nn \l__exsheets_blank_linespread_tl { #1 }
}
-\NewDocumentCommand \blank { o m }
+\NewDocumentCommand \blank { som }
{
\group_begin:
- \IfNoValueF { #1 } { \keys_set:nn { exsheets / blank } { #1 } }
- \exsheets_blank:n { #2 }
+ \IfNoValueF { #2 } { \keys_set:nn { exsheets / blank } { #2 } }
+ \mode_if_horizontal:TF
+ { \exsheets_blank:n { #3 } }
+ {
+ \IfBooleanF { #1 } { \noindent }
+ \exsheets_blank:n { #3 }
+ \IfBooleanF { #1 }
+ {
+ \bool_if:NT \l__exsheets_blank_linespread_bool
+ { \linespread { \l__exsheets_blank_linespread_tl } \selectfont }
+ \par
+ }
+ }
\group_end:
}
@@ -1907,6 +1996,30 @@
% \makeatother
% ----------------------------------------------------------------------------
+% \examspace
+% insert space for a student to answer a question
+\cs_new:Npn \__exsheets_examspace:nn #1#2
+ {
+ \par \tex_penalty:D -100 \scan_stop:
+ \group_begin:
+ \dim_set:Nn \l_tmpa_dim { #2 }
+ \dim_set:Nn \l_tmpb_dim { \pagegoal - \pagetotal }
+ \dim_compare:nTF { \l_tmpa_dim > \l_tmpb_dim }
+ {
+ \vfil \break
+ \IfBooleanF { #1 }
+ {
+ \dim_sub:Nn \l_tmpa_dim { \l_tmpb_dim }
+ \vspace* { \l_tmpa_dim }
+ }
+ }
+ { \vspace* { #2 } }
+ \group_end:
+ }
+\NewDocumentCommand \examspace { sm }
+ { \__exsheets_examspace:nn { #1 } { #2 } }
+
+% ----------------------------------------------------------------------------
% SETUP
\NewDocumentCommand \SetupExSheets { o m }
{
@@ -2040,6 +2153,10 @@ HISTORY:
update
- upload to CTAN
+2012/10/23 v0.3 - bugfix in \exref
+ - new: \NewQuSolPair, \RenewQuSolPair, \examspace
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
-- points/decimal-marker, points/frac (?), points/format (?,im interface) \ No newline at end of file
+- points/decimal-marker, points/frac (?), points/format (?,im interface)
+- grading table? Should not be necessary...? Access via meta-data
diff --git a/Master/texmf-dist/tex/latex/exsheets/translations.sty b/Master/texmf-dist/tex/latex/exsheets/translations.sty
index 208bc7295c1..feb1ff1d369 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/10/08}
-\def\@trnslt@version{v0.2b}
+\def\@trnslt@date{2012/10/23}
+\def\@trnslt@version{v0.3}
\ProvidesPackage{translations}[\@trnslt@date\space \@trnslt@version\space a simple translator]
\RequirePackage{etoolbox}