From ece52c2cf2361f40a788fc16e8a7753e83c53daf Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Jan 2016 00:15:01 +0000 Subject: exsheets (28jan16) git-svn-id: svn://tug.org/texlive/trunk@39499 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/exsheets/exsheets.sty | 70 ++++++++++------------- 1 file changed, 29 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist/tex/latex/exsheets') diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index 67ddf52f531..8e2ff302e89 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty @@ -28,8 +28,8 @@ \RequirePackage { expl3 , xparse } \ExplSyntaxOn -\tl_const:Nn \c_exsheets_date_tl {2016/01/26} -\tl_const:Nn \c_exsheets_version_tl {0.21} +\tl_const:Nn \c_exsheets_date_tl {2016/01/28} +\tl_const:Nn \c_exsheets_version_tl {0.21a} \tl_const:Nn \c_exsheets_info_tl {Yet~ another~ package~ for~ the~ creation~ of~ exercise~ sheets~ and~ exams.} @@ -1702,7 +1702,7 @@ \cs_new:Npn \exsheets_get_question_property:nn #1#2 { \prop_if_in:cnTF { g__exsheets_question_property_#1_prop } {#2} - { \prop_get:cn { g__exsheets_question_property_#1_prop } {#2} } + { \prop_item:cn { g__exsheets_question_property_#1_prop } {#2} } { ?? } } \cs_generate_variant:Nn \exsheets_get_question_property:nn { no } @@ -2416,11 +2416,10 @@ { \prop_map_inline:Nn \g_exsheets_question_identification_prop { - \prop_if_in:NnT \g__exsheets_solutions_names_prop {##1} - { - \__exsheets_print_solutions_section:nnn {##1} {##2} - { \arabic{section} } - } + \__exsheets_print_solutions_section:nnn + {##1} + {##2} + { \arabic{section} } } } { @@ -2442,21 +2441,15 @@ { \prop_map_inline:Nn \g_exsheets_question_identification_prop { - \prop_if_in:NnT \g__exsheets_solutions_names_prop {##1} - { - \__exsheets_print_solutions_section:nnn - {##1} {##2} { \l__exsheets_tmpa_int } - } + \__exsheets_print_solutions_section:nnn + {##1} {##2} { \l__exsheets_tmpa_int } } \int_incr:N \l__exsheets_tmpa_int } } { \prop_map_inline:Nn \g_exsheets_question_identification_prop - { - \prop_if_in:NnT \g__exsheets_solutions_names_prop {##1} - { \__exsheets_print_solutions_section:nnn {##1} {##2} {#1} } - } + { \__exsheets_print_solutions_section:nnn {##1} {##2} {#1} } } } @@ -2474,11 +2467,8 @@ { \prop_map_inline:Nn \g_exsheets_question_identification_prop { - \prop_if_in:NnT \g__exsheets_solutions_names_prop {##1} - { - \__exsheets_print_solutions_chapter:nnn {##1} {##2} - { \arabic{chapter} } - } + \__exsheets_print_solutions_chapter:nnn {##1} {##2} + { \arabic{chapter} } } } { @@ -2500,23 +2490,17 @@ { \prop_map_inline:Nn \g_exsheets_question_identification_prop { - \prop_if_in:NnT \g__exsheets_solutions_names_prop {##1} - { - \__exsheets_print_solutions_chapter:nnn - {##1} - {##2} - { \l__exsheets_tmpa_int } - } + \__exsheets_print_solutions_chapter:nnn + {##1} + {##2} + { \l__exsheets_tmpa_int } } \int_incr:N \l__exsheets_tmpa_int } } { \prop_map_inline:Nn \g_exsheets_question_identification_prop - { - \prop_if_in:NnT \g__exsheets_solutions_names_prop {##1} - { \__exsheets_print_solutions_chapter:nnn {##1} {##2} {#1} } - } + { \__exsheets_print_solutions_chapter:nnn {##1} {##2} {#1} } } } @@ -2562,14 +2546,17 @@ % \prop_map_function:NN \g_exsheets_question_identification_prop \cs_new_protected:Npn \exsheets_print_solutions_if:nnn #1#2#3 { - \int_set_eq:NN - \l__exsheets_current_sec_int - \l__exsheets_counter_sec_int - \int_set_eq:NN - \l__exsheets_current_ch_int - \l__exsheets_counter_ch_int - \__exsheets_read_number:w #3 \q_stop - \__exsheets_print_solution_if:nn {#2} {#1} + \prop_if_in:NnT \g__exsheets_solutions_names_prop {#1} + { + \int_set_eq:NN + \l__exsheets_current_sec_int + \l__exsheets_counter_sec_int + \int_set_eq:NN + \l__exsheets_current_ch_int + \l__exsheets_counter_ch_int + \__exsheets_read_number:w #3 \q_stop + \__exsheets_print_solution_if:nn {#2} {#1} + } } % print by ID: @@ -3296,6 +3283,7 @@ HISTORY: \g_exsheets_question_identification_prop - make question properties accessable when question is not printed +2016/01/26 v0.21a - remove deprecated \prop_get:Nn (=> \prop_item:Nn) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: -- cgit v1.2.3