summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exsheets
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-29 23:28:32 +0000
committerKarl Berry <karl@freefriends.org>2013-04-29 23:28:32 +0000
commitf39ecf357dcabe86d7841b9b1f0226ff23936bf5 (patch)
treefee982fb4da3128b566743698b2496bdc98a5b36 /Master/texmf-dist/tex/latex/exsheets
parent2e581c28cb4e1f20cd408c0bdc9885c7f18f9e5e (diff)
exsheets (29apr13)
git-svn-id: svn://tug.org/texlive/trunk@30166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/exsheets')
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/cntformats.sty62
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets.sty251
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def72
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/tasks.sty42
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/translations.sty17
5 files changed, 285 insertions, 159 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/cntformats.sty b/Master/texmf-dist/tex/latex/exsheets/cntformats.sty
index dcf99e3b027..f97ca6147e0 100644
--- a/Master/texmf-dist/tex/latex/exsheets/cntformats.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/cntformats.sty
@@ -23,14 +23,13 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-% The cntformats package consists of the files
-% - cntformats.sty
+% The cntformats package is part of the exsheets bundle
% --------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\def\@cntfmts@date{2012/11/08}
-\def\@cntfmts@version{v0.4}
+\def\@cntfmts@date{2012/04/23}
+\def\@cntfmts@version{v0.5}
\ProvidesPackage{cntformats}[\@cntfmts@date\space \@cntfmts@version\space A different way to read counters.]
\RequirePackage{etoolbox}
@@ -67,7 +66,7 @@
% if you happen to read this code and notice some obvious reasons why these
% macros shoudn't be used like this, please send me your improved version
% (seriously! But please explain why yours is better)
-\def\ifintl#1#2{%
+\long\def\@cntfmts@ifintl#1#2{%
\def\@cntfmts@intl@tmpa##1#2{}%
\expandafter\if\expandafter\relax\expandafter
\detokenize\expandafter{\@cntfmts@intl@tmpa#1{}{}#2}\relax%
@@ -76,11 +75,11 @@
\expandafter\@firstoftwo
\fi
}
-\def\ifintlcs#1{%
- \expandafter\ifintl\expandafter{#1}}
+\long\def\@cntfmts@ifintlcs#1{%
+ \expandafter\@cntfmts@ifintl\expandafter{#1}}
-\long\def\replaceonceincs#1#2#3{%
- \ifintlcs#1{#2}%
+\long\def\@cntfmts@replaceonceincs#1#2#3{%
+ \@cntfmts@ifintlcs#1{#2}%
{\@cntfmts@replace@once@incs#1{#2}{#3}}{}%
}
\long\def\@cntfmts@replace@once@incs#1#2#3{%
@@ -89,21 +88,21 @@
\expandafter\@cntfmts@replo@tmpa#1\q@stop
}
-\long\def\replaceallin#1#2#3{%
+\long\def\@cntfmts@replaceallin#1#2#3{%
\def\@cntfmts@repla@tmpa{#1}%
- \replaceonceincs\@cntfmts@repla@tmpa{#2}{#3}%
- \ifintlcs\@cntfmts@repla@tmpa{#2}%
- {\expandafter\replaceallin\expandafter{\@cntfmts@repla@tmpa}{#2}{#3}}%
+ \@cntfmts@replaceonceincs\@cntfmts@repla@tmpa{#2}{#3}%
+ \@cntfmts@ifintlcs\@cntfmts@repla@tmpa{#2}%
+ {\expandafter\@cntfmts@replaceallin\expandafter{\@cntfmts@repla@tmpa}{#2}{#3}}%
{\expandonce\@cntfmts@repla@tmpa}%
}
-\long\def\replaceallincs#1#2#3{%
- \replaceonceincs#1{#2}{#3}%
- \ifintlcs#1{#2}{\replaceallincs#1{#2}{#3}}{}%
+\long\def\@cntfmts@replaceallincs#1#2#3{%
+ \@cntfmts@replaceonceincs#1{#2}{#3}%
+ \@cntfmts@ifintlcs#1{#2}{\@cntfmts@replaceallincs#1{#2}{#3}}{}%
}
% ----------------------------------------------------------------------------
% expansion tools
-% heavily inspired by expl3's \exp_args:N<spec>
+% heavily inspired by expl3's \exp_args:N<spec> -- one might say: copied
\long\def\@cntfmts@getnextbraced#1#2#3{#2\@cntfmts@firstofone{#3{#1}}}
\long\def\@cntfmts@firstofone#1{#1}
\long\def\@cntfmts@braced@unexpanded#1\@cntfmts@firstofone#2#3{%
@@ -158,7 +157,7 @@
% #2: counter
% #3: id
\newcommand*\@cntfmts@add@counter@pattern[3][cntfmts]{%
- \ifcsdef{the#2}
+ \ifcsdef{c@#2}
{}{\@cntfmts@err@unknown@counter{#2}}%
\ifcsdef{@#1@#2@counter}
{\@cntfmts@err@pattern@defined{#1}{#2}}
@@ -264,7 +263,7 @@
% #1: module
% #2: pattern-key
\def\@cntfmts@replace@pattern#1#2{%
- \replaceallincs\@cntfmts@parsed@pattern
+ \@cntfmts@replaceallincs\@cntfmts@parsed@pattern
{#2}{{}\csuse{@#1@read@#2@counter}}}
\newrobustcmd*\ReadCounterPattern[2][cntfmts]{%
@@ -310,15 +309,28 @@
\NewPatternFormat{r}{\@roman}
\NewPatternFormat{R}{\@Roman}
-\ifdef\theparagraph
+\ifdef\c@paragraph
{\AddCounterPattern{paragraph}{pg}}{}
-\ifdef\thesubsubsection
+\ifdef\c@subsubsection
{\AddCounterPattern{subsubsection}{ssse}}{}
-\ifdef\thesubsection
+\ifdef\c@subsection
{\AddCounterPattern{subsection}{sse}}{}
-\ifdef\thesection
+\ifdef\c@section
{\AddCounterPattern{section}{se}}{}
-\ifdef\thechapter
+\ifdef\c@chapter
{\AddCounterPattern{chapter}{ch}}{}
-\endinput \ No newline at end of file
+\endinput
+
+% HISTORY:
+2012/09/30 v0.2beta - first version (as part of the `exsheets' bundle)
+2012/11/08 v0.4 - stepped number with `exsheets' until now; next stepping
+ won't synchronize but will step to whatever deems
+ appropriate
+2012/04/23 v0.5 - changed tests for heading commands to test explicitly for
+ the associated counters
+ - change test for counter in \@cntfmts@add@counter@pattern
+ from \the<ounter> to \c@<ounter>
+ - rename tokenlist test macros to use cntformats'
+ namespace
+ \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index df10a42d33f..0d5fd6cbc35 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/21}
-\def\exsheets@version{0.9c}
+\def\exsheets@date{2013/04/25}
+\def\exsheets@version{0.9d}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -88,6 +88,12 @@
\token_to_str:N \totalpoints .~I~will~do~nothing~instead.
}
+\msg_new:nnn { exsheets} { parse-points }
+ {
+ You~need~to~activate~"points/parse"~if~you~want~to~use~
+ \token_to_str:N #1 .~I~will~do~nothing~instead.
+ }
+
\msg_new:nnn { exsheets} { headings }
{
You~requested~the~headings~instance~`#1'~\msg_line_context: \c_space_tl
@@ -281,6 +287,8 @@
\tl_set:Nn \l__exsheets_points_pre_bonus_marker_tl { (+ }
\tl_new:N \l__exsheets_points_post_bonus_marker_tl
\tl_set:Nn \l__exsheets_points_post_bonus_marker_tl { ) }
+\tl_new:N \l__exsheets_points_format_tl
+\tl_set:Nn \l__exsheets_points_format_tl { \use:n }
\cs_new_protected_nopar:Npn \exsheets_set_points_name:n #1
{
@@ -310,11 +318,17 @@
% FIXME: \fp_add will deprecate!
\cs_new_protected_nopar:Npn \exsheets_add_points:n #1
- { \fp_gadd:Nn \g__exsheets_points_sum_fp { #1 } }
+ {
+ \fp_gadd:Nn \g__exsheets_points_sum_fp { #1 }
+ \fp_gadd:Nn \g__exsheets_this_question_points_fp { #1 }
+ }
\cs_generate_variant:Nn \exsheets_add_points:n { V }
\cs_new_protected_nopar:Npn \exsheets_add_bonus:n #1
- { \fp_gadd:Nn \g__exsheets_bonus_sum_fp { #1 } }
+ {
+ \fp_gadd:Nn \g__exsheets_bonus_sum_fp { #1 }
+ \fp_gadd:Nn \g__exsheets_this_question_bonus_fp { #1 }
+ }
\cs_generate_variant:Nn \exsheets_add_bonus:n { V }
\cs_new_protected_nopar:Npn \exsheets@sum@of@points #1
@@ -330,7 +344,7 @@
{
\bool_if:NTF \l__exsheets_parse_points_bool
{ \exsheets_num:n { \fp_to_decimal:n { #1 } } }
- { \use:n { \fp_to_decimal:n { #1 } } }
+ { \use:n { #1 } }
}
\group_end:
}
@@ -343,7 +357,7 @@
{
\bool_if:NTF \l__exsheets_parse_points_bool
{ \exsheets_num:n { \fp_to_decimal:n { #1 } } }
- { \use:n { \fp_to_decimal:n { #1 } } }
+ { \use:n { #1 } }
}
\group_end:
}
@@ -440,8 +454,13 @@
\cs_new_protected_nopar:Npn \exsheets_print_points:n #1
{
- \exsheets_parse_points:n { #1 }
- \exsheets_points_name:n { #1 }
+ \group_begin:
+ \tl_use:N \l__exsheets_points_format_tl
+ {
+ \exsheets_parse_points:n { #1 }
+ \exsheets_points_name:n { #1 }
+ }
+ \group_end:
}
\cs_generate_variant:Nn \exsheets_print_points:n { V }
@@ -454,30 +473,46 @@
\NewDocumentCommand \pointssum { s }
{
- \IfBooleanTF { #1 }
- { \exsheets_parse_points:n { \g__exsheets_total_points_fp } }
- { \exsheets_print_points:n { \g__exsheets_total_points_fp } }
+ \bool_if:NTF \l__exsheets_parse_points_bool
+ {
+ \IfBooleanTF { #1 }
+ { \exsheets_parse_points:n { \g__exsheets_total_points_fp } }
+ { \exsheets_print_points:n { \g__exsheets_total_points_fp } }
+ }
+ { \msg_warning:nnn { exsheets } { parse-points } { \pointssum } }
}
\NewDocumentCommand \bonussum { s }
{
- \IfBooleanTF { #1 }
- { \exsheets_parse_bonus:n { \g__exsheets_total_bonus_fp } }
- { \exsheets_print_bonus:n { \g__exsheets_total_bonus_fp } }
+ \bool_if:NTF \l__exsheets_parse_points_bool
+ {
+ \IfBooleanTF { #1 }
+ { \exsheets_parse_bonus:n { \g__exsheets_total_bonus_fp } }
+ { \exsheets_print_bonus:n { \g__exsheets_total_bonus_fp } }
+ }
+ { \msg_warning:nnn { exsheets } { parse-points } { \bonussum } }
}
\NewDocumentCommand \currentpointssum { s }
{
- \IfBooleanTF { #1 }
- { \exsheets_parse_points:n { \g__exsheets_points_sum_fp } }
- { \exsheets_print_points:n { \g__exsheets_points_sum_fp } }
+ \bool_if:NTF \l__exsheets_parse_points_bool
+ {
+ \IfBooleanTF { #1 }
+ { \exsheets_parse_points:n { \g__exsheets_points_sum_fp } }
+ { \exsheets_print_points:n { \g__exsheets_points_sum_fp } }
+ }
+ { \msg_warning:nnn { exsheets } { parse-points } { \currentpointssum } }
}
\NewDocumentCommand \currentbonussum { s }
{
- \IfBooleanTF { #1 }
- { \exsheets_parse_bonus:n { \g__exsheets_bonus_sum_fp } }
- { \exsheets_print_bonus:n { \g__exsheets_bonus_sum_fp } }
+ \bool_if:NTF \l__exsheets_parse_points_bool
+ {
+ \IfBooleanTF { #1 }
+ { \exsheets_parse_bonus:n { \g__exsheets_bonus_sum_fp } }
+ { \exsheets_print_bonus:n { \g__exsheets_bonus_sum_fp } }
+ }
+ { \msg_warning:nnn { exsheets } { parse-points } { \currentbonussum } }
}
\NewDocumentCommand \totalpoints { s }
@@ -551,6 +586,7 @@
pre-bonus .tl_set:N = \l__exsheets_points_pre_bonus_marker_tl ,
post-bonus .tl_set:N = \l__exsheets_points_post_bonus_marker_tl ,
use-name .bool_set:N = \l__exsheets_points_name_bool ,
+ format .tl_set:N = \l__exsheets_points_format_tl ,
number-format .tl_set:N = \l__exsheets_points_number_format_tl ,
bonus-format .tl_set:N = \l__exsheets_bonus_number_format_tl ,
parse .bool_set:N = \l__exsheets_parse_points_bool ,
@@ -920,9 +956,13 @@
\tl_new:N \g__exsheets_questions_current_id_tl
\tl_new:N \l__exsheets_title_tl
\tl_new:N \l__exsheets_questions_label_tl
+\tl_new:N \l__exsheets_questions_points_tl
\bool_new:N \l__exsheets_points_not_given_bool
+\fp_new:N \g__exsheets_this_question_points_fp
+\fp_new:N \g__exsheets_this_question_bonus_fp
+
\cs_new_protected:Npn \__exsheets_read_points:w #1+#2+#3 \q_stop
{
\tl_if_blank:nTF { #1 }
@@ -937,7 +977,11 @@
}
}
\cs_new_protected:Npn \__exsheets_read_points:n #1
- { \__exsheets_read_points:w #1++ \q_stop }
+ {
+ \bool_if:NTF \l__exsheets_parse_points_bool
+ { \__exsheets_read_points:w #1++ \q_stop }
+ { \tl_set:Nn \l__exsheets_questions_points_tl { #1 } }
+ }
\newenvironment { __exsheets_question: } [2]
{
@@ -1012,6 +1056,8 @@
\g__exsheets_questions_id_int
}
% Punktevergabe:
+ \fp_gzero:N \g__exsheets_this_question_points_fp
+ \fp_gzero:N \g__exsheets_this_question_bonus_fp
\IfNoValueTF { #2 }
{
\__exsheets_read_points:n { 0 }
@@ -1025,6 +1071,9 @@
}
}
{
+ \fp_gset_eq:NN
+ \g__exsheets_this_question_points_fp
+ \l__exsheets_question_points_fp
\__exsheets_read_points:n { #2 }
\SetQuestionProperties{points=#2}
}
@@ -1087,17 +1136,38 @@
\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 }
- \__exsheets_use_heading:VVVnn
- \l__exsheets_question_heading_instance_tl
- \l__exsheets_title_tl
- \l__exsheets_qu_counter_interpretation_tl
- { \l__exsheets_question_points_fp }
- { \l__exsheets_question_bonus_fp }
+ \bool_if:NTF \l__exsheets_parse_points_bool
+ {
+ \__exsheets_use_heading:VVVnn
+ \l__exsheets_question_heading_instance_tl
+ \l__exsheets_title_tl
+ \l__exsheets_qu_counter_interpretation_tl
+ { \l__exsheets_question_points_fp }
+ { \l__exsheets_question_bonus_fp }
+ }
+ {
+ \__exsheets_use_heading:VVVnn
+ \l__exsheets_question_heading_instance_tl
+ \l__exsheets_title_tl
+ \l__exsheets_qu_counter_interpretation_tl
+ { \l__exsheets_questions_points_tl }
+ { 0 }
+ }
}
}
\__exsheets_questions_internal:
}
- { \end__exsheets_questions_internal: }
+ {
+ \end__exsheets_questions_internal:
+ \bool_if:NF \l__exsheets_points_questions_default_bool
+ {
+ \fp_compare:nT { \g__exsheets_this_question_points_fp > 0 }
+ {
+ \exp_args:Nx \SetQuestionProperties
+ { points = \fp_to_tl:N \g__exsheets_this_question_points_fp }
+ }
+ }
+ }
% current question number:
\prop_new:N \g__exsheets_question_number_prop
@@ -1398,6 +1468,9 @@
\group_end:
}
+\int_new:N \l__exsheets_questions_set_int
+\int_new:N \g__exsheets_select_random_int
+
\cs_new_protected:Npn \exsheets_include_questions:n #1
{
\bool_set_true:N \l__exsheets_select_questions_bool
@@ -1406,7 +1479,13 @@
\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_questions_set_int
+ \g__exsheets_questions_used_int
+ \int_set_eq:NN
+ \l__exsheets_tmpc_int
+ \g__exsheets_questions_id_int
+ \int_gzero:N \g__exsheets_select_random_int
\exsheets_file_input_if_exist:n { ##1 }
\__exsheets_prop_count:NN
\g__exsheets_included_questions_prop
@@ -1489,23 +1568,12 @@
\int_gincr:N \g__exsheets_questions_id_int
\bool_if:NTF \l__exsheets_include_random_bool
{
- \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_gincr:N \g__exsheets_select_random_int
+ \int_set_eq:NN \l__exsheets_tmpa_int \g__exsheets_select_random_int
+% ID: \int_use:N \g__exsheets_questions_id_int ,~
+% set: \int_use:N \l__exsheets_questions_set_int ,~
+% selection: \int_use:N \g__exsheets_selection_number_int ,~
+% tmpa: \int_use:N \l__exsheets_tmpa_int \par
}
{
\int_set_eq:NN
@@ -2245,15 +2313,15 @@
{
style .choice: ,
style / line .code:n =
- { \cs_set_eq:NN \exsheets_write_blank:n \uline } ,
+ \cs_set_eq:NN \exsheets_write_blank:n \uline ,
style / wave .code:n =
- { \cs_set_eq:NN \exsheets_write_blank:n \uwave } ,
+ \cs_set_eq:NN \exsheets_write_blank:n \uwave ,
style / dline .code:n =
- { \cs_set_eq:NN \exsheets_write_blank:n \uuline } ,
+ \cs_set_eq:NN \exsheets_write_blank:n \uuline ,
style / dotted .code:n =
- { \cs_set_eq:NN \exsheets_write_blank:n \dotuline } ,
+ \cs_set_eq:NN \exsheets_write_blank:n \dotuline ,
style / dashed .code:n =
- { \cs_set_eq:NN \exsheets_write_blank:n \dashuline } ,
+ \cs_set_eq:NN \exsheets_write_blank:n \dashuline ,
scale .tl_set:N = \l__exsheets_blank_scale_tl ,
width .code:n =
{
@@ -2269,8 +2337,7 @@
{
\group_begin:
\IfNoValueF { #2 } { \keys_set:nn { exsheets / blank } { #2 } }
- \mode_if_horizontal:TF
- { \exsheets_blank:n { #3 } }
+ \mode_if_vertical:TF
{
\IfBooleanF { #1 } { \noindent }
\exsheets_blank:n { #3 }
@@ -2281,13 +2348,16 @@
\par
}
}
+ { \exsheets_blank:n { #3 } }
\group_end:
}
\cs_new_protected:Npn \exsheets_blank:n #1
{
\box_clear:N \l__exsheets_blank_box
- \hbox_set:Nn \l__exsheets_blank_box { #1 }
+ \mode_if_math:TF
+ { \hbox_set:Nn \l__exsheets_blank_box { $ \m@th \mathpalette{}{#1} $ } }
+ { \hbox_set:Nn \l__exsheets_blank_box { #1 } }
\bool_if:NTF \l__exsheets_inside_solution_bool
{ \exsheets_write_blank:n { #1 } }
{
@@ -2305,23 +2375,27 @@
\bool_if:NTF \l__exsheets_blank_width_bool
{ \dim_set:Nn \l__exsheets_tmpa_dim { #1 } }
{
- \fp_set:Nn \l_tmpa_fp { \dim_to_fp:n { #1 } }
- \fp_mul:Nn \l_tmpa_fp { \l__exsheets_blank_scale_tl }
+ \fp_set:Nn \l_tmpa_fp
+ { \dim_to_fp:n { #1 } * \l__exsheets_blank_scale_tl }
\dim_set:Nn \l__exsheets_tmpa_dim { \fp_to_dim:N \l_tmpa_fp }
}
\dim_compare:nTF { \l__exsheets_tmpa_dim > 2em }
{
- \exsheets_write_blank:n { \skip_horizontal:n { 1em } }
- \dim_sub:Nn \l__exsheets_tmpa_dim { 2em }
- \dim_do_while:nn { \l__exsheets_tmpa_dim > \c_zero_dim }
+ \mode_if_math:TF
+ { \exsheets_write_blank:n { \skip_horizontal:N \l__exsheets_tmpa_dim } }
{
- \tex_penalty:D \hyphenpenalty
- \dim_compare:nTF { \l__exsheets_tmpa_dim < 1pt }
- { \exsheets_write_blank:n { \skip_horizontal:N \l__exsheets_tmpa_dim } }
- { \exsheets_write_blank:n { \skip_horizontal:n { 1pt } } }
- \dim_sub:Nn \l__exsheets_tmpa_dim { 1pt }
+ \exsheets_write_blank:n { \skip_horizontal:n { 1em } }
+ \dim_sub:Nn \l__exsheets_tmpa_dim { 2em }
+ \dim_do_while:nn { \l__exsheets_tmpa_dim > \c_zero_dim }
+ {
+ \tex_penalty:D \hyphenpenalty
+ \dim_compare:nTF { \l__exsheets_tmpa_dim < 1pt }
+ { \exsheets_write_blank:n { \skip_horizontal:N \l__exsheets_tmpa_dim } }
+ { \exsheets_write_blank:n { \skip_horizontal:n { 1pt } } }
+ \dim_sub:Nn \l__exsheets_tmpa_dim { 1pt }
+ }
+ \exsheets_write_blank:n { \skip_horizontal:n { 1em } }
}
- \exsheets_write_blank:n { \skip_horizontal:n { 1em } }
}
{ \exsheets_write_blank:n { \skip_horizontal:N \l__exsheets_tmpa_dim } }
}
@@ -2535,8 +2609,6 @@ HISTORY:
\bonus, \bonussum, \pointssum, \currentpointssum,
\currentbonussum
- added grades distribution
- - `translations' got \LoadDictionary and \LoadDictionaryFor
- added and loads of languages defined.
2012/10/05 v0.2a - resolved bug in saving and recovering question number
using \exsheets@save@number and \QuestionNumber
2012/10/08 v0.2b - improved the reference to chapter/solution numbers
@@ -2577,7 +2649,6 @@ HISTORY:
- 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'
@@ -2590,40 +2661,26 @@ HISTORY:
- \includequestions[random=<num>] now obeys class
as done with \SetupExSheets{use-topics={foo,bar}}
- new macro \questionsincludedlast
-2013/04/04 v0.8a - translations: bug fix in \DeclareDictTranslation
- - exsheets: added Portuguese translations
- - tasks: corrected \seq_length:N => \seq_count:N
-2013/04/07 v0.9 - translations: slightly improved messages
- - tasks: protected internal commands where appropriate
- - tasks: made enumerated item referenceable with \label{}
- and \ref{}; this introduced new options:
- * the former `label-format' is now `counter-format'
- * new: `label-format'
- - tasks: changed defaults for `label-width' and
- `label-offset'
- - tasks: ensure that the `after-item-skip' is only
- inserted in between rows
- - tasks: new option `after-item-skip'
- - tasks: improvements when label are set with optional
- argument:
- * a provided but empty argument is now correctly
- recognized
- * the counter is _not_ stepped anymore for enumerated
- lists when the optional argument is provided
- - 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/04 v0.8a - added Portuguese translations
+2013/04/07 v0.9 - protected internal commands where appropriate
+ - added possibility to set general options with
+ \NewQuSolPair and \RenewQuSolPair
+2013/04/08 v0.9a - added headings instance `empty'
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
-
+2013/04/25 v0.9d - bug fix: \includequestions works correctly when used
+ multiple times together with ordinary instances of
+ the {question} environment
+ - bug fix: points/parse=false correctly disables parsing
+ points again
+ - bug fix: \addpoints didn't add to the question property
+ - new option `points/format'
+ - \blank now works in math mode, it doesn't do linebreaks
+ there if `ulem' doesn't allow them (which it doesn't)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
-- points/decimal-marker, points/frac (?), points/format (?,im interface)
+- points/decimal-marker, points/frac (?), points/format (?,im interface) \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
index c9f80403371..7c320340b2c 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
@@ -298,45 +298,57 @@
}
\hcoffin_set:Nn \l__exsheets_heading_points_coffin
{
- \bool_if:nF { \fp_compare_p:n { #3 = 0 } && \fp_compare_p:n { #4 = 0 } }
+ \bool_if:NTF \l__exsheets_parse_points_bool
{
- \tl_use:N \l__exsheets_heading_points_format_tl
- \group_begin:
- \tl_use:N \l__exsheets_heading_title_format_tl \strut
- \group_end:
- \tl_use:N \l__exsheets_heading_points_pre_code_tl
+ \bool_if:nF { \fp_compare_p:n { #3 = 0 } && \fp_compare_p:n { #4 = 0 } }
{
- \fp_compare:nF { #3 = 0 }
- {
- \bool_if:nTF
- {
- \l__exsheets_points_separate_bonus_bool ||
- \fp_compare_p:n { #4 = 0 }
- }
- { \exsheets_print_points:n { #3 } }
- { \exsheets_parse_points:n { #3 } }
- }
- \bool_if:nT { !\fp_compare_p:n { #3 = 0 } && !\fp_compare_p:n { #4 = 0 } }
- { ~ }
- \fp_compare:nF { #4 = 0 }
+ \tl_use:N \l__exsheets_heading_points_format_tl
+ \group_begin:
+ \tl_use:N \l__exsheets_heading_title_format_tl \strut
+ \group_end:
+ \tl_use:N \l__exsheets_heading_points_pre_code_tl
{
- \tl_use:N \l__exsheets_points_pre_bonus_marker_tl
- \bool_if:nTF
+ \fp_compare:nF { #3 = 0 }
{
- \l__exsheets_points_separate_bonus_bool ||
- \fp_compare_p:n { #3 = 0 }
+ \bool_if:nTF
+ {
+ \l__exsheets_points_separate_bonus_bool ||
+ \fp_compare_p:n { #4 = 0 }
+ }
+ { \exsheets_print_points:n { #3 } }
+ { \exsheets_parse_points:n { #3 } }
}
+ \bool_if:nT { !\fp_compare_p:n { #3 = 0 } && !\fp_compare_p:n { #4 = 0 } }
+ { ~ }
+ \fp_compare:nF { #4 = 0 }
{
- \exsheets_print_bonus:n { #4 }
- \tl_use:N \l__exsheets_points_post_bonus_marker_tl
- }
- {
- \exsheets_parse_bonus:n { #4 }
- \tl_use:N \l__exsheets_points_post_bonus_marker_tl
- \exsheets_points_name:n { #3 + #4 }
+ \tl_use:N \l__exsheets_points_pre_bonus_marker_tl
+ \bool_if:nTF
+ {
+ \l__exsheets_points_separate_bonus_bool ||
+ \fp_compare_p:n { #3 = 0 }
+ }
+ {
+ \exsheets_print_bonus:n { #4 }
+ \tl_use:N \l__exsheets_points_post_bonus_marker_tl
+ }
+ {
+ \exsheets_parse_bonus:n { #4 }
+ \tl_use:N \l__exsheets_points_post_bonus_marker_tl
+ \exsheets_points_name:n { #3 + #4 }
+ }
}
}
+ \tl_use:N \l__exsheets_heading_points_post_code_tl
}
+ }
+ {% points/parse = false
+ \tl_use:N \l__exsheets_heading_points_format_tl
+ \group_begin:
+ \tl_use:N \l__exsheets_heading_title_format_tl \strut
+ \group_end:
+ \tl_use:N \l__exsheets_heading_points_pre_code_tl
+ { \exsheets_print_points:n { #3 } }
\tl_use:N \l__exsheets_heading_points_post_code_tl
}
}
diff --git a/Master/texmf-dist/tex/latex/exsheets/tasks.sty b/Master/texmf-dist/tex/latex/exsheets/tasks.sty
index d0b73f1f8f6..52fffde6e58 100644
--- a/Master/texmf-dist/tex/latex/exsheets/tasks.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/tasks.sty
@@ -28,8 +28,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\def\@tasks@date{2013/04/07}
-\def\@tasks@version{0.9}
+\def\@tasks@date{2013/04/22}
+\def\@tasks@version{0.9a}
\RequirePackage { expl3 , xparse , l3keys2e }
\ProvidesExplPackage
@@ -70,6 +70,7 @@
\bool_new:N \l__tasks_resume_bool
\bool_new:N \l__tasks_load_tasks_bool
\bool_new:N \l__tasks_label_width_bool
+\bool_new:N \l__tasks_item_indent_bool
\bool_new:N \l__tasks_label_offset_bool
\bool_new:N \l__tasks_custom_label_bool
\bool_new:N \l__tasks_custom_after_item_skip_bool
@@ -89,6 +90,7 @@
\tl_new:N \l__tasks_tmp_label_tl
\dim_new:N \l__tasks_item_indent_dim
+\dim_new:N \l__tasks_item_default_indent_dim
\dim_new:N \l__tasks_item_width_dim
\dim_new:N \l__tasks_label_width_dim
\dim_new:N \l__tasks_label_default_width_dim
@@ -268,7 +270,7 @@
{
enumerate = \l__tasks_enumerate_bool ,
label = \l__tasks_label_tl ,
- indent = \l__tasks_item_indent_dim ,
+ indent = \l__tasks_item_default_indent_dim ,
counter-format = \l__tasks_label_pattern_tl ,
label-format = \l__tasks_label_format_tl ,
label-width = \l__tasks_label_default_width_dim ,
@@ -283,6 +285,12 @@
\l__tasks_label_width_dim
\l__tasks_label_default_width_dim
}
+ \bool_if:NF \l__tasks_item_indent_bool
+ {
+ \dim_set_eq:NN
+ \l__tasks_item_indent_dim
+ \l__tasks_item_default_indent_dim
+ }
\bool_if:NF \l__tasks_label_offset_bool
{
\dim_set_eq:NN
@@ -444,6 +452,9 @@
\dim_set:Nn \l__tasks_label_offset_dim { #1 }
\bool_set_true:N \l__tasks_label_offset_bool ,
label-align .tl_set:N = \l__tasks_label_align_tl ,
+ item-indent .code:n =
+ \dim_set:Nn \l__tasks_item_indent_dim { #1 }
+ \bool_set_true:N \l__tasks_item_indent_bool ,
before-skip .skip_set:N = \l__tasks_before_list_skip ,
after-skip .skip_set:N = \l__tasks_after_list_skip ,
after-item-skip .code:n =
@@ -532,4 +543,27 @@
{ \tasks_setup:n { #1 } }
% --------------------------------------------------------------------------
-\tex_endinput:D \ No newline at end of file
+\tex_endinput:D
+
+% HISTORY:
+2013/01/19 v0.7 - extracted from `exsheets' package; this also lead to a
+ slightly new syntax and a few new options for it
+2013/04/04 v0.8a - corrected \seq_length:N => \seq_count:N
+2013/04/07 v0.9 - protected internal commands where appropriate
+ - made enumerated item referenceable with \label{}
+ and \ref{}; this introduced new options:
+ * the former `label-format' is now `counter-format'
+ * new: `label-format'
+ - changed defaults for `label-width' and `label-offset'
+ - ensure that the `after-item-skip' is only
+ inserted in between rows
+ - new option `after-item-skip'
+ - improvements when label are set with optional argument:
+ * a provided but empty argument is now correctly recognized
+ * the counter is _not_ stepped anymore for enumerated
+ lists when the optional argument is provided
+ - new command \startnewitemline that forces the next item to
+ be put at the beginning of a row
+2013/04/22 v0.9a - new option `item-indent'
+ - synchronized version number with `exsheets' until now but
+ won't any more \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/exsheets/translations.sty b/Master/texmf-dist/tex/latex/exsheets/translations.sty
index fbd5976d838..1f46c1ca8ce 100644
--- a/Master/texmf-dist/tex/latex/exsheets/translations.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/translations.sty
@@ -23,8 +23,7 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
-% The translations package consists of the files
-% - translations.sty
+% The translations package is part of the exsheets bundle.
% --------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
@@ -369,4 +368,16 @@
\DeclareLanguageAlias {Turkish}{turkish}
\DeclareLanguageAlias {Ukrainian}{ukrainian}
-\endinput \ No newline at end of file
+\endinput
+
+% HISTORY:
+2012/09/30 v0.2beta - first version (as part of the `exsheets' bundle)
+2012/10/05 v0.2 - \LoadDictionary and \LoadDictionaryFor added and loads of
+ languages defined.
+2013/03/10 v0.8 - basic dictionaries for English, German, French and Spanish
+ - new command \DeclareDictTranslation
+2013/04/04 v0.8a - bug fix in \DeclareDictTranslation
+2013/04/07 v0.9 - slightly improved messages
+2013/04/08 v0.9a - changed fallback warning into info
+ - synchronized version number with `exsheets' until now but
+ won't any more