summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-23 22:10:13 +0000
committerKarl Berry <karl@freefriends.org>2013-04-23 22:10:13 +0000
commit1d2a6fd2512cbd4325e55f9607aa3ba191515ff7 (patch)
tree7d8ade1189f5a31eea1f0104cd94252deb716d2a /Master
parentd28917f9c5b9050df841e1879d918a6082d0f29f (diff)
exsheets (23apr13)
git-svn-id: svn://tug.org/texlive/trunk@30075 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/README2
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdfbin691187 -> 690078 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex23
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/grading-table.pdfbin26483 -> 26483 bytes
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets.sty247
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def7
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/tasks.sty30
7 files changed, 203 insertions, 106 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README
index 02c40c8c448..55317f7c961 100644
--- a/Master/texmf-dist/doc/latex/exsheets/README
+++ b/Master/texmf-dist/doc/latex/exsheets/README
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
-EXSHEETS v0.9a - 2013/04/08
+EXSHEETS v0.9c - 2013/04/21
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 f459bbf0559..50be4c19ddc 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 6d2ff8a691d..74ed6fdc596 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
@@ -1324,6 +1324,17 @@ These are the available commands and options:
\section{Selectively Include Questions from External Files}\label{sec:include}
\secidx{Include from External Files}
+\subsection{Caveat}
+I need to say some words of caution: the \cmd{includequestions} that will be
+presented shortly is probably \ExSheets' most experimental one at the time of
+writing (\today). Thanks to feedback of users it is constantly improved and
+bugs are fixed. It is not a very efficient way to insert question regarding
+performance and you shouldn't wonder if compilation slows down when you use it.
+It probably needs to be re-written all over but on the one hand that would
+introduce new bugs and on the other hand for the time being I don't have the
+capacities, anyway, so you'll have to live it, I'm afraid.
+
+\subsection{How it works}
Suppose you have one or more files with questions prepared to use them as a kind
of database. One for class A, say, one for class B, one for class C and so one,
something like this:
@@ -1667,16 +1678,16 @@ The following examples use a sample text defined as follows:
A `simple' heading. \sample
\end{question}
+\newpage % FIXME: watch pagebreaks!
\subsubsection{The `empty' Instance}
\sinceversion{0.9a}
\begin{beispiel}[code only]
\DeclareInstance{exsheets-heading}{empty}{default}
{
- runin = true ,
- above = \parskip ,
- below = \parskip ,
- attach =
- { main[l,vc] points[l,vc] (\linewidth + \marginparsep,0pt) }
+ runin = true ,
+ above = \parskip ,
+ below = \parskip ,
+ attach = { main[l,vc]points[l,vc](\linewidth+\marginparsep,0pt) }
}
\end{beispiel}
\SetupExSheets{headings=empty}
@@ -1834,6 +1845,7 @@ The following examples use a sample text defined as follows:
A `runin-wp-rev' heading. \sample
\end{question}
+\newpage % FIXME: watch pagebreaks!
\subsubsection{The `runin-nr' Instance}
\begin{beispiel}[code only]
\DeclareInstance{exsheets-heading}{runin-nr}{default}
@@ -2008,6 +2020,7 @@ Text before
A `margin' heading. \sample
\end{question}
+\newpage % FIXME: watch pagebreaks!
\subsubsection{The `margin-nr' Instance}
\begin{beispiel}[code only]
\DeclareInstance{exsheets-heading}{margin-nr}{default}
diff --git a/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf b/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf
index 50a466af818..ad2da7f271e 100644
--- a/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf
+++ b/Master/texmf-dist/doc/latex/exsheets/grading-table.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index f24065715ef..df10a42d33f 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/04/08}
-\def\exsheets@version{0.9a}
+\def\exsheets@date{2013/04/21}
+\def\exsheets@version{0.9c}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -41,6 +41,29 @@
{\exsheets@version}
{Yet another package for the creation of exercise sheets and exams.}
+% --------------------------------------------------------------------------
+% check expl3 version:
+\@ifpackagelater { expl3 } { 2012/11/21 }
+ { }
+ {
+ \PackageError { exsheets } { Support~package~expl3~too~old }
+ {
+ You~need~to~update~your~installation~of~the~bundles~'l3kernel'~and~
+ 'l3packages'.\MessageBreak
+ Loading~exsheets~will~abort!
+ }
+ \tex_endinput:D
+ }
+
+% ----------------------------------------------------------------------------
+% variants of kernel functions:
+\cs_generate_variant:Nn \prop_get:NnN { Nx }
+\cs_generate_variant:Nn \prop_get:NnN { cf }
+\cs_generate_variant:Nn \prop_get:NnNTF { Nx }
+\cs_generate_variant:Nn \prop_gput:Nnn { Nf , Nff , Nfx }
+\cs_generate_variant:Nn \prop_gput:Nnn { Nx , Nxx }
+\cs_generate_variant:Nn \prop_gput:Nnn { cf , cff }
+
% ----------------------------------------------------------------------------
% temporary variables
\tl_new:N \l__exsheets_tmpa_tl
@@ -55,6 +78,7 @@
\seq_new:N \l__exsheets_tmpa_seq
\fp_new:N \l__exsheets_tmpa_fp
\clist_new:N \l__exsheets_tmpa_clist
+\bool_new:N \l__exsheets_tmpa_bool
% ----------------------------------------------------------------------------
% messages
@@ -332,7 +356,7 @@
\fp_to_tl:N \l__exsheets_tmpa_tl
\group_end:
}
-\cs_generate_variant:Nn \exsheets_num:n { x }
+\cs_generate_variant:Nn \exsheets_num:n { V,x }
\cs_new_nopar:Npn \exsheets_points_name:n #1
{
@@ -827,8 +851,6 @@
}
}
}
-\cs_generate_variant:Nn \prop_get:NnN { cf }
-\cs_generate_variant:Nn \prop_gput:Nnn { cf , cff }
\cs_new_protected:Npn \exsheets_declare_question_class:nn #1#2
{
@@ -838,10 +860,7 @@
}
\NewDocumentCommand \DeclareQuestionClass { mm }
- {
- \exsheets_declare_question_class:nn { #1 } { #2 }
-% \exsheets_declare_question_property:n { #1 }
- }
+ { \exsheets_declare_question_class:nn { #1 } { #2 } }
\@onlypreamble \DeclareQuestionClass
% ----------------------------------------------------------------------------
@@ -920,7 +939,7 @@
\cs_new_protected:Npn \__exsheets_read_points:n #1
{ \__exsheets_read_points:w #1++ \q_stop }
-\NewDocumentEnvironment { __exsheets_question: } { gg }
+\newenvironment { __exsheets_question: } [2]
{
\bool_set_true:N \l__exsheets_inside_question_bool
\bool_if:NT \l__exsheets_questions_use_bool
@@ -938,33 +957,14 @@
\int_gincr:N \g__exsheets_questions_id_int
\tl_if_blank:VTF \l__exsheets_questions_id_tl
{
- \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 }
}
{
- \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 }
}
+ % label:
\tl_if_blank:VTF \l__exsheets_questions_label_tl
{
\bool_if:NT \l__exsheets_auto_label_bool
@@ -985,6 +985,31 @@
pageref = \exp_not:N \pageref { \l__exsheets_questions_label_tl }
}
}
+ % FIXME: rather useless since it isn't used at all, see also
+ % exsheets_headings.def
+ \tl_if_blank:VF \l__exsheets_questions_meta_tl
+ {
+ \prop_gput:NVV \g__exsheets_questions_meta_prop
+ \g__exsheets_questions_current_id_tl
+ \l__exsheets_questions_meta_tl
+ }
+ }
+ \bool_if:nT
+ {
+ !\l__exsheets_questions_deactivate_bool &&
+ !\l__exsheets_select_questions_bool
+ }
+ {
+ \bool_if:NT \l__exsheets_questions_use_bool
+ {
+ \prop_gput:NVV \g__exsheets_questions_used_prop
+ \g__exsheets_questions_current_id_tl
+ \g__exsheets_questions_id_int
+ \int_gincr:N \g__exsheets_questions_used_int
+ }
+ \prop_gput:NVV \g__exsheets_questions_id_prop
+ \g__exsheets_questions_current_id_tl
+ \g__exsheets_questions_id_int
}
% Punktevergabe:
\IfNoValueTF { #2 }
@@ -1009,19 +1034,10 @@
\l__exsheets_question_heading_instance_tl
\l__exsheets_heading_instance_tl
}
- % meta:
- \tl_if_blank:VF \l__exsheets_questions_meta_tl
- {
- \prop_gput:NVV \g__exsheets_questions_meta_prop
- \g__exsheets_questions_current_id_tl
- \l__exsheets_questions_meta_tl
- }
% 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: }
- }
+ { \use:c { __exsheets_questions_use_##1: } }
\bool_if:nT
{
\g__exsheets_questions_use_bool &&
@@ -1094,7 +1110,6 @@
\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
{
@@ -1347,11 +1362,14 @@
\bool_new:N \l__exsheets_select_questions_bool
\bool_new:N \l__exsheets_include_all_bool
\bool_new:N \l__exsheets_include_random_bool
+\bool_new:N \l__exsheets_include_by_id_bool
\bool_set_true:N \l__exsheets_include_all_bool
-\prop_new:N \g__exsheets_selected_questions_prop
+
+\prop_new:N \g__exsheets_included_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
@@ -1383,6 +1401,7 @@
\cs_new_protected:Npn \exsheets_include_questions:n #1
{
\bool_set_true:N \l__exsheets_select_questions_bool
+ \clist_gclear:N \questionsincludedlast
\seq_set_split:Nnn \l__exsheets_tmpa_seq { , } { #1 }
\seq_map_inline:Nn \l__exsheets_tmpa_seq
{
@@ -1390,7 +1409,7 @@
\int_set_eq:NN \l__exsheets_tmpc_int \g__exsheets_questions_id_int
\exsheets_file_input_if_exist:n { ##1 }
\__exsheets_prop_count:NN
- \g__exsheets_selected_questions_prop
+ \g__exsheets_included_questions_prop
\l__exsheets_tmpa_int
\bool_if:NT \l__exsheets_questions_debug_bool
{
@@ -1398,11 +1417,11 @@
{ \linewidth }
{
The~file~ ` \texttt { \tl_to_str:n { ##1 } } ' ~contains~
- \exsheets_prop_count:N \g__exsheets_selected_questions_prop
+ \exsheets_prop_count:N \g__exsheets_included_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
+ \prop_map_inline:Nn \g__exsheets_included_questions_prop
{ \__exsheets_list_comma: ####2 }
}
}
@@ -1410,24 +1429,9 @@
\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
+ \prop_gclear:N \g__exsheets_included_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
@@ -1442,19 +1446,17 @@
% - 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 } ,
- % 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 =
+ % the `exclude' option does _not_ set \l__exsheets_include_random_bool ,
+ % \l__exsheets_include_by_id_bool or \l__exsheets_include_all_bool so
+ % it can be combined with the other options:
+ exclude .clist_set:N = \l__exsheets_exclude_id_clist ,
+ 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
@@ -1472,53 +1474,95 @@
\bool_if:NT \l__exsheets_questions_use_bool
{
\int_gincr:N \g__exsheets_selection_number_int
- \exp_args:NNx
- \prop_gput:Nnn \g__exsheets_selected_questions_prop
- { \int_use:N \g__exsheets_selection_number_int } { #1 }
+ \bool_if:NTF \l__exsheets_include_random_bool
+ {
+ \prop_gput:Nxn \g__exsheets_included_questions_prop
+ { \int_use:N \g__exsheets_selection_number_int } { #1 }
+ }
+ {
+ \prop_gput:Nxn \g__exsheets_included_questions_prop
+ { \int_use:N \g__exsheets_questions_id_int } { #1 }
+ }
}
}
{
\int_gincr:N \g__exsheets_questions_id_int
- \int_set:Nn \l__exsheets_tmpa_int
+ \bool_if:NTF \l__exsheets_include_random_bool
{
- \int_mod:nn
- { \g__exsheets_questions_id_int }
- { \g__exsheets_selection_number_int }
+ \int_set:Nn \l__exsheets_tmpa_int
+ {
+ \int_mod:nn
+ { \g__exsheets_questions_id_int }
+ { \g__exsheets_selection_number_int }
+ }
+ \int_set:Nn \l__exsheets_tmpa_int { \l__exsheets_tmpa_int - 1 }
+ \int_compare:nTF { \l__exsheets_tmpa_int = -1 }
+ {
+ \int_set_eq:NN
+ \l__exsheets_tmpa_int
+ \g__exsheets_selection_number_int
+ }
+ {
+ \int_compare:nT { \l__exsheets_tmpa_int = 0 }
+ { \int_set:Nn \l__exsheets_tmpa_int { 1 } }
+ }
}
- \int_compare:nT { \l__exsheets_tmpa_int = 0 }
{
\int_set_eq:NN
\l__exsheets_tmpa_int
- \g__exsheets_selection_number_int
+ \g__exsheets_questions_id_int
}
- \prop_get:NxN \g__exsheets_selected_questions_prop
+ \prop_get:NxN \g__exsheets_included_questions_prop
{ \int_use:N \l__exsheets_tmpa_int }
\l__exsheets_tmpa_tl
- \bool_if:NF \l__exsheets_include_all_bool
- { \__exsheets_select_question_by_id:V \l__exsheets_tmpa_tl }
+ \__exsheets_select_question_by_id:V \l__exsheets_tmpa_tl
}
}
}
\cs_generate_variant:Nn \__exsheets_select_question:n { V }
-\cs_generate_variant:Nn \prop_get:NnN { Nx }
\cs_new_protected:Npn \__exsheets_select_question_by_id:n #1
{
- \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 }
- }
+ \bool_if:NTF \l__exsheets_include_all_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 }
+ {
+ \bool_gset_true:N \g__exsheets_questions_use_bool
+ \clist_gput_right:Nn \questionsincludedlast { #1 }
+ \prop_gput:NnV \g__exsheets_questions_used_prop
+ { #1 }
+ \g__exsheets_questions_id_int
+ \int_gincr:N \g__exsheets_questions_used_int
+ \prop_gput:NnV \g__exsheets_questions_id_prop
+ { #1 }
+ \g__exsheets_questions_id_int
+ }
+ }
+ {% parsing list of included IDs
+ \clist_if_in:NnTF
+ \l__exsheets_include_id_clist
+ { #1 }
+ {
+ \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
+ \clist_gput_right:Nn \questionsincludedlast { #1 }
+ \prop_gput:NnV \g__exsheets_questions_used_prop
+ { #1 }
+ \g__exsheets_questions_id_int
+ \int_gincr:N \g__exsheets_questions_used_int
+ \prop_gput:NnV \g__exsheets_questions_id_prop
+ { #1 }
+ \g__exsheets_questions_id_int
+ }
+ }
+ { \bool_gset_false:N \g__exsheets_questions_use_bool }
}
}
\cs_generate_variant:Nn \__exsheets_select_question_by_id:n { V }
@@ -1533,11 +1577,11 @@
{
% number of question in file:
\__exsheets_prop_count:NN
- \g__exsheets_selected_questions_prop
+ \g__exsheets_included_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 \g__exsheets_included_questions_prop
{
\prop_map_inline:Nn \l__exsheets_class_prop
{
@@ -1587,7 +1631,7 @@
{
\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
+ \prop_get:NVN \g__exsheets_included_questions_prop
\l__exsheets_tmpa_tl
\l__exsheets_tmpb_tl
\clist_if_in:NVF \l__exsheets_include_id_clist \l__exsheets_tmpb_tl
@@ -1687,7 +1731,6 @@
}
}
}
-\cs_generate_variant:Nn \prop_gput:Nnn { Nff,Nfx,Nfn,Nxx }
\cs_generate_variant:Nn \__exsheets_save_solution:n { V }
\NewEnviron { __exsheets_solution_internal: }
@@ -1702,7 +1745,7 @@
\tl_new:N \l__exsheets_use_solution_tl
-\NewDocumentEnvironment { __exsheets_solution: } { g }
+\newenvironment { __exsheets_solution: } [1]
{
\tl_clear:N \l__exsheets_use_solution_tl
\prop_map_inline:Nn \l__exsheets_class_prop
@@ -2567,13 +2610,19 @@ HISTORY:
recognized
* the counter is _not_ stepped anymore for enumerated
lists when the optional argument is provided
- - tasks: new command \nextonnewrow that forces the next
+ - tasks: new command \startnewitemline that forces the next
item to be put at the beginning of a row
- exsheets: protected internal commands where appropriate
- exsheets: added possibility to set general options
with \NewQuSolPair and \RenewQuSolPair
2013/04/08 v0.9a - exsheets: added headings instance `empty'
- translations: changed fallback warning into info
+2013/04/18 v0.9b - fixed erroneous behaviour of \includequestions when
+ used more than once
+ - added hook \l__exsheets_heading_points_post_hook_tl
+2013/04/21 v0.9c - bug fix: \ForEachQuestion seems to work correctly
+ again
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
index 66dbffcb590..c9f80403371 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
@@ -72,6 +72,7 @@
\tl_new:N \l__exsheets_heading_points_format_tl
\tl_new:N \l__exsheets_heading_points_pre_code_tl
\tl_new:N \l__exsheets_heading_points_post_code_tl
+\tl_new:N \l__exsheets_heading_points_post_hook_tl
\tl_new:N \l__exsheets_heading_joined_coffins_tl
\tl_new:N \l__exsheets_heading_attached_coffins_tl
@@ -281,6 +282,9 @@
{ \tl_use:N \l__exsheets_heading_title_user_format_tl #2 }
\tl_use:N \l__exsheets_heading_number_post_code_tl
}
+ % TODO: if questions are included via \includequestions
+ % \g__exsheets_questions_current_id_tl doesn't hold the current ID any
+ % more when the questions are typeset
\hcoffin_set:Nn \l__exsheets_heading_meta_coffin
{
\prop_get:NoNT \g__exsheets_questions_meta_prop
@@ -336,6 +340,9 @@
\tl_use:N \l__exsheets_heading_points_post_code_tl
}
}
+ % this allows users to provide their own point system while also using
+ % exsheets' positioning mechanism:
+ \tl_use:N \l__exsheets_heading_points_post_hook_tl
\bool_if:nT
{ !\l__exsheets_heading_runin_bool && !\l__exsheets_heading_inline_bool }
{
diff --git a/Master/texmf-dist/tex/latex/exsheets/tasks.sty b/Master/texmf-dist/tex/latex/exsheets/tasks.sty
index b6f2d01eef5..d0b73f1f8f6 100644
--- a/Master/texmf-dist/tex/latex/exsheets/tasks.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/tasks.sty
@@ -38,9 +38,25 @@
{\@tasks@version}
{Horizontal columned lists.}
+% --------------------------------------------------------------------------
+% check expl3 version:
+\@ifpackagelater { expl3 } { 2012/11/21 }
+ { }
+ {
+ \PackageError { tasks } { Support~package~expl3~too~old }
+ {
+ You~need~to~update~your~installation~of~the~bundles~'l3kernel'~and~
+ 'l3packages'.\MessageBreak
+ Loading~tasks~will~abort!
+ }
+ \tex_endinput:D
+ }
+
+% --------------------------------------------------------------------------
% requirements:
\RequirePackage { epic , cntformats , xtemplate , environ }
+% --------------------------------------------------------------------------
% variables:
\seq_new:N \l__tasks_seq
@@ -87,7 +103,7 @@
\NewCounterPattern* [ tasks ] { task } { tsk }
\ReadCounterFrom [ tasks ] { task } \g__tasks_int
-% scratch variables:
+% temporary variables:
\tl_new:N \l__tasks_tmpa_tl
\int_new:N \g__tasks_tmpa_int
\int_new:N \l__tasks_tmpb_int
@@ -95,6 +111,7 @@
\coffin_new:N \l__tasks_tmpb_coffin
\coffin_new:N \l__tasks_tmpc_coffin
+% --------------------------------------------------------------------------
% collect the tasks:
\cs_new_protected:Npn \__tasks_collect_tasks:nw #1#2 \end #3
{
@@ -228,6 +245,7 @@
\cs_generate_variant:Nn \__tasks_label_align:n { V }
\__tasks_label_align:n { left }
+% --------------------------------------------------------------------------
% the `tasks' object:
% #1: number of items
% #2: number of columns
@@ -358,6 +376,7 @@
\tl_set:Nn \l__tasks_item_tl { \ignorespaces #2 }
}
+% --------------------------------------------------------------------------
% choice box:
\bool_new:N \l__tasks_choice_checked_bool
\dim_new:N \l__tasks_choice_width_dim
@@ -405,6 +424,7 @@
\providecommand* \choicebox { \tasks_choice: }
\providecommand* \checkedchoicebox { \tasks_choice_checked: }
+% --------------------------------------------------------------------------
% base instance:
% ALPHABETIZE: a) b) c)
\DeclareInstance { tasks } { alphabetize } { default } { }
@@ -432,6 +452,7 @@
resume .bool_set:N = \l__tasks_resume_bool
}
+% --------------------------------------------------------------------------
% the generic environment:
\NewEnviron { __tasks_env: } [ 3 ]
{
@@ -452,6 +473,7 @@
\skip_vertical:N \l__tasks_after_list_skip
}
+% --------------------------------------------------------------------------
% command to start a new row:
\cs_new_protected:Npn \tasks_new_row:
{
@@ -466,6 +488,7 @@
\NewDocumentCommand \startnewitemline {}
{ \tasks_new_row: }
+% --------------------------------------------------------------------------
% the user environment:
\NewDocumentCommand \NewTasks { O{}mO{\task}D(){1} }
{
@@ -481,9 +504,11 @@
{ \end__tasks_env: }
}
+% --------------------------------------------------------------------------
% default list:
\NewTasks { tasks }
+% --------------------------------------------------------------------------
% package options:
\keys_define:nn { tasks / options }
{
@@ -498,10 +523,13 @@
{ \input { tasks.cfg } }
}
+% --------------------------------------------------------------------------
+% setup:
\cs_new_protected:Npn \tasks_setup:n #1
{ \keys_set:nn { tasks / list } { #1 } }
\NewDocumentCommand \settasks { m }
{ \tasks_setup:n { #1 } }
+% --------------------------------------------------------------------------
\tex_endinput:D \ No newline at end of file