diff options
author | Karl Berry <karl@freefriends.org> | 2013-02-18 23:54:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-02-18 23:54:20 +0000 |
commit | cdbdc383307e5585391076143f1a790aeacc220f (patch) | |
tree | a3e871fe7b71b22ebd83570d7886bae823bbefae /Master/texmf-dist/tex/latex/exsheets | |
parent | 1f1d4332f1e59e5e4f7c988ad31b1a11a92b1ffe (diff) |
exsheets (18feb13)
git-svn-id: svn://tug.org/texlive/trunk@29155 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/exsheets')
-rw-r--r-- | Master/texmf-dist/tex/latex/exsheets/exsheets.sty | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/exsheets/translations.sty | 4 |
2 files changed, 36 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index 6ac2e4dddc0..8ad8e86a9a7 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/01/21} -\def\exsheets@version{0.7a} +\def\exsheets@date{2013/02/17} +\def\exsheets@version{0.7b} \RequirePackage { expl3 , xparse } \ProvidesExplPackage @@ -50,6 +50,7 @@ \int_new:N \l__exsheets_tmpb_int \int_new:N \l__exsheets_tmpc_int \int_new:N \l__exsheets_tmpd_int +\int_new:N \l__exsheets_tmpe_int \dim_new:N \l__exsheets_tmpa_dim \seq_new:N \l__exsheets_tmpa_seq \fp_new:N \l__exsheets_tmpa_fp @@ -570,7 +571,11 @@ { \int_use:N \l__exsheets_tmpa_int } } \cs_set:cpn { __exsheets_variation_ \int_to_roman:n { #1 } :n } ##1 - { ##1 \use:c { __exsheets_variation_ \int_to_roman:n { #1 + 1 } :n } } + { + ##1 + \cs_set:Npn \exsheets_last_variant: { ##1 } + \use:c { __exsheets_variation_ \int_to_roman:n { #1 + 1 } :n } + } } { \msg_warning:nnxx { exsheets } { variant } @@ -580,6 +585,8 @@ \cs_new:Npn \exsheets_vary:w { \__exsheets_variation_i:n } + +\cs_new:Npn \exsheets_last_variant: { } \cs_new:Npn \__exsheets_generate_variation_auxiliary:n #1 { @@ -604,6 +611,9 @@ \NewDocumentCommand \vary { } { \exsheets_vary:w } +\NewDocumentCommand \lastvariant { } + { \exsheets_last_variant: } + % initiate: two variations, first is default \SetVariations { 2 } \variant { 1 } @@ -1484,12 +1494,24 @@ } { \int_gincr:N \g__exsheets_questions_id_int + \int_set:Nn \l__exsheets_tmpa_int + { + \int_mod:nn + { \g__exsheets_questions_id_int } + { \g__exsheets_selection_number_int } + } + \int_compare:nT { \l__exsheets_tmpa_int = 0 } + { + \int_set_eq:NN + \l__exsheets_tmpa_int + \g__exsheets_selection_number_int + } \exp_args:NNx - \prop_get:NnN \g__exsheets_questions_id_prop - { \int_use:N \g__exsheets_questions_id_int } - \l_tmpa_tl + \prop_get:NnN \g__exsheets_selected_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_tmpa_tl } + { \__exsheets_select_question_by_id:V \l__exsheets_tmpa_tl } } } } @@ -1573,6 +1595,9 @@ \cs_new:Npn \__exsheets_save_solution:n #1 { % save for later use + \bool_if:NTF \l__exsheets_include_all_bool + { \int_set:Nn \l__exsheets_tmpe_int { \g__exsheets_questions_id_int -1 } } + { \int_set_eq:NN \l__exsheets_tmpe_int \g__exsheets_questions_id_int } \prop_gput:Nff \g__exsheets_solutions_content_prop { \int_use:N \g__exsheets_questions_id_int } { #1 } @@ -2406,6 +2431,7 @@ HISTORY: than before 2013/01/21 v0.7a - added option `auto-label' and questions key `label', also added question properties `ref' and `pageref' +2013/02/17 v0.7b - bug fix: question selection by ID now works again %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/latex/exsheets/translations.sty b/Master/texmf-dist/tex/latex/exsheets/translations.sty index 09338cc1452..143a1ab2688 100644 --- a/Master/texmf-dist/tex/latex/exsheets/translations.sty +++ b/Master/texmf-dist/tex/latex/exsheets/translations.sty @@ -244,9 +244,11 @@ \@onlypreamble\LoadDictionary \newrobustcmd*\LoadDictionaryFor[2]{% - \@trnslt@load@dictionary@for{#1}{#2}} + \@trnslt@load@dictionary@for{#2}{#1}} \@onlypreamble\LoadDictionaryFor +% #1: name +% #2: lang \def\@trnslt@load@dictionary@for#1#2{% \AtBeginDocument{% \InputIfFileExists{#1-\@trnslt@language{#2}.trsl} |