diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-08 22:01:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-08 22:01:25 +0000 |
commit | 8a0e29b0e58b2bc46dd9227f4d3e6c009414306c (patch) | |
tree | 40ffbbd012bc89a8ddfa2080910cdcf0bd84db2a /Master/texmf-dist/tex/latex/exsheets/exsheets.sty | |
parent | d43ee48953990b7021d39c2b086fa43d079fdd3b (diff) |
exsheets (8dec13)
git-svn-id: svn://tug.org/texlive/trunk@32363 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/exsheets/exsheets.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/exsheets/exsheets.sty | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index 7a67093fe33..033507e03a0 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty @@ -25,8 +25,8 @@ % If you have any ideas, questions, suggestions or bugs to report, please % feel free to contact me. % ---------------------------------------------------------------------------- -\def\exsheets@date{2013/12/02} -\def\exsheets@version{0.12} +\def\exsheets@date{2013/12/08} +\def\exsheets@version{0.12a} \RequirePackage { expl3 , xparse } \ProvidesExplPackage @@ -226,8 +226,8 @@ \tl_new:N \l__exsheets_solution_heading_instance_tl \tl_new:N \l_exsheets_heading_title_user_format_tl \tl_set:Nn \l_exsheets_heading_title_user_format_tl { \normalsize\bfseries } -\tl_new:N \l_exsheets_subtitle_format_tl -\tl_set:Nn \l_exsheets_subtitle_format_tl { \normalsize\bfseries\itshape } +\tl_new:N \l_exsheets_heading_subtitle_user_format_tl +\tl_set:Nn \l_exsheets_heading_subtitle_user_format_tl { \normalsize\itshape } \tl_new:N \l__exsheets_questions_toclevel_tl \tl_set:Nn \l__exsheets_questions_toclevel_tl { subsection } \tl_new:N \l__exsheets_solutions_toclevel_tl @@ -252,7 +252,8 @@ load-headings .bool_set:N = \l__exsheets_load_headings_bool , headings-format .tl_set:N = \l_exsheets_heading_title_user_format_tl , - subtitle-format .tl_set:N = \l_exsheets_subtitle_format_tl , + subtitle-format .tl_set:N = + \l_heading_exsheets_subtitle_user_format_tl , load-tasks .bool_set:N = \l__exsheets_load_tasks_bool , use-ref .bool_set:N = \l__exsheets_solutions_by_ref_bool , totoc .choice: , @@ -309,7 +310,7 @@ \tl_new:N \l__exsheets_points_number_format_tl \tl_new:N \l__exsheets_bonus_number_format_tl \tl_new:N \l__exsheets_points_pre_bonus_marker_tl -\tl_set:Nn \l__exsheets_points_pre_bonus_marker_tl { (+ } +\tl_set:Nn \l__exsheets_points_pre_bonus_marker_tl { \space(+ } \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 @@ -542,29 +543,34 @@ \NewDocumentCommand \totalpoints { s } { - \exsheets_totalpoints: - \IfBooleanF { #1 } + \group_begin: + \tl_use:N \l__exsheets_points_format_tl { - \bool_if:nT + \exsheets_totalpoints: + \IfBooleanF { #1 } { - \l__exsheets_points_separate_bonus_bool || - \fp_compare_p:n { \g_exsheets_total_bonus_fp = 0 } + \bool_if:nT + { + \l__exsheets_points_separate_bonus_bool || + \fp_compare_p:n { \g_exsheets_total_bonus_fp = 0 } + } + { \exsheets_points_name:n { \g_exsheets_total_points_fp } } } - { \exsheets_points_name:n { \g_exsheets_total_points_fp } } - } - \exsheets_totalbonus: - \IfBooleanF { #1 } - { - \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 } + \exsheets_totalbonus: + \IfBooleanF { #1 } { - \bool_if:NTF \l__exsheets_points_separate_bonus_bool - { \exsheets_bonus_name:n { \g_exsheets_total_bonus_fp } } + \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 } { - \exsheets_points_name:n - { \g_exsheets_total_points_fp + \g_exsheets_total_bonus_fp } + \bool_if:NTF \l__exsheets_points_separate_bonus_bool + { \exsheets_bonus_name:n { \g_exsheets_total_bonus_fp } } + { + \exsheets_points_name:n + { \g_exsheets_total_points_fp + \g_exsheets_total_bonus_fp } + } } } } + \group_end: } \exsheets_depr_cmd:nn { \sumpoints } { \totalpoints* } @@ -589,7 +595,6 @@ { \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 } { - \tl_use:N \c_space_tl \tl_use:N \l__exsheets_points_pre_bonus_marker_tl \exsheets_parse_bonus:n { \g_exsheets_total_bonus_fp } @@ -611,7 +616,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 , + 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 , @@ -1143,8 +1148,8 @@ { \exsheets_set_question_properties:x { subtitle = { \exp_not:V \l__exsheets_questions_subtitle_tl } } - % FIXME: rather useless since it isn't used at all, see also - % exsheets_headings.def + % this is used in the headings instance; could maybe be replaced + % by retrieving the property... % \prop_gput:NVV \g__exsheets_questions_subtitle_prop % \g__exsheets_questions_current_id_tl % \l__exsheets_questions_subtitle_tl @@ -2898,6 +2903,7 @@ HISTORY: - changed horizontal spaces declared as `1ex' into `.3333em' in the declarations of the headings instances + - added subtitles 2013/11/07 v0.10a - fix bug in loading headings of questions; when included from an external file sometimes the wrong ID has been passed to the headings @@ -2912,7 +2918,7 @@ HISTORY: retrieved before the corresponding question is printed - make \GetQuestionProperty expandable - - new syntax featture in points argument: a leading + - new syntax feature in points argument: a leading bang prevents the points from being added to the sum of points - added possibility for @@ -2920,6 +2926,10 @@ HISTORY: - added \IfQuestionSubtitle(TF) - added `subtitle' property - dropped `color' option +2013/12/08 v0.12a - changed details in the printing mechanism of the + points which seems to be more consistent + - fix bug introduced in the last update: subtitles work + again %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: |