diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/exsheets/exsheets.sty | 47 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def | 46 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/exsheets/tasks.sty | 20 |
3 files changed, 65 insertions, 48 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index 0d5fd6cbc35..32234196478 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/25} -\def\exsheets@version{0.9d} +\def\exsheets@date{2013/05/26} +\def\exsheets@version{0.9f} \RequirePackage { expl3 , xparse } \ProvidesExplPackage @@ -75,6 +75,7 @@ \int_new:N \l__exsheets_tmpd_int \int_new:N \l__exsheets_tmpe_int \dim_new:N \l__exsheets_tmpa_dim +\dim_new:N \l__exsheets_tmpb_dim \seq_new:N \l__exsheets_tmpa_seq \fp_new:N \l__exsheets_tmpa_fp \clist_new:N \l__exsheets_tmpa_clist @@ -1448,8 +1449,8 @@ \cs_new_protected:Npn \exsheets_prop_count:N #1 { - \__exsheets_prop_count:NN #1 \l_tmpa_int - \int_use:N \l_tmpa_int + \__exsheets_prop_count:NN #1 \l__exsheets_tmpa_int + \int_use:N \l__exsheets_tmpa_int } \cs_new_protected:Npn \__exsheets_prop_count:NN #1#2 @@ -2375,9 +2376,9 @@ \bool_if:NTF \l__exsheets_blank_width_bool { \dim_set:Nn \l__exsheets_tmpa_dim { #1 } } { - \fp_set:Nn \l_tmpa_fp + \fp_set:Nn \l__exsheets_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_set:Nn \l__exsheets_tmpa_dim { \fp_to_dim:N \l__exsheets_tmpa_fp } } \dim_compare:nTF { \l__exsheets_tmpa_dim > 2em } { @@ -2434,21 +2435,25 @@ % insert space for a student to answer a question \cs_new_protected:Npn \__exsheets_examspace:nn #1#2 { - \par \tex_penalty:D -100 \scan_stop: - \group_begin: - \dim_set:Nn \l_tmpa_dim { #2 } - \dim_set:Nn \l_tmpb_dim { \pagegoal - \pagetotal } - \dim_compare:nTF { \l_tmpa_dim > \l_tmpb_dim } + \par + \tex_penalty:D -100 \scan_stop: +% \group_begin: + \dim_set:Nn \l__exsheets_tmpa_dim { #2 } + \dim_set:Nn \l__exsheets_tmpb_dim { \pagegoal - \pagetotal - \baselineskip } + \dim_show:N \l__exsheets_tmpa_dim + \dim_show:N \l__exsheets_tmpb_dim + \dim_compare:nTF { \l__exsheets_tmpa_dim > \l__exsheets_tmpb_dim } { - \vfil \break + \dim_compare:nT { \l__exsheets_tmpb_dim > 0pt } { \vfil } + \break \IfBooleanF { #1 } { - \dim_sub:Nn \l_tmpa_dim { \l_tmpb_dim } - \vspace* { \l_tmpa_dim } + \dim_sub:Nn \l__exsheets_tmpa_dim { \l__exsheets_tmpb_dim } + \vspace* { \l__exsheets_tmpa_dim } } } - { \vspace* { #2 } } - \group_end: + { \skip_vertical:N \l__exsheets_tmpa_dim } +% \group_end: } \NewDocumentCommand \examspace { sm } { \__exsheets_examspace:nn { #1 } { #2 } } @@ -2680,7 +2685,15 @@ HISTORY: - 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) +2013/05/01 v0.9e - corrected erroneous behaviour of \examspace +2013/05/26 v0.9f - fixed incorrectly placed links when the `totoc' + option is enabled and questions/solutions are at the + top of a new page because there wasn't enough place + left at the page before %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: -- points/decimal-marker, points/frac (?), points/format (?,im interface)
\ No newline at end of file +- points/decimal-marker, points/frac (?), points/format (?,im interface) +- points: swedish style +- \examspace inside {tasks} => possible? (\pagegoal-\pagetotal) gives wrong + values here diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def index 7c320340b2c..637cde2cfd0 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def @@ -207,28 +207,6 @@ \AssignTemplateKeys \bool_if:NT \l__exsheets_heading_inline_bool { \cs_set_eq:NN \exsheets_par: \scan_stop: } - \bool_if:nT - { \l__exsheets_questions_totoc_bool && \l__exsheets_inside_question_bool } - { - \phantomsection - \addcontentsline { toc } { \l__exsheets_questions_toclevel_tl } - { - \bool_if:NTF \l__exsheets_heading_toc_reversed_bool - { #2 \ #1 } - { #1 \ #2 } - } - } - \bool_if:nT - { \l__exsheets_solutions_totoc_bool && !\l__exsheets_inside_question_bool } - { - \phantomsection - \addcontentsline { toc } { \l__exsheets_solutions_toclevel_tl } - { - \bool_if:NTF \l__exsheets_heading_toc_reversed_bool - { #2 \ #1 } - { #1 \ #2 } - } - } \seq_set_split:NnV \l__exsheets_heading_joined_coffins_seq { ; } \l__exsheets_heading_joined_coffins_tl \seq_set_split:NnV \l__exsheets_heading_attached_coffins_seq { ; } @@ -382,6 +360,28 @@ \noindent } \skip_set:Nn \parfillskip { 0pt plus 1fil } + \bool_if:nT + { \l__exsheets_questions_totoc_bool && \l__exsheets_inside_question_bool } + { + \phantomsection + \addcontentsline { toc } { \l__exsheets_questions_toclevel_tl } + { + \bool_if:NTF \l__exsheets_heading_toc_reversed_bool + { #2 \ #1 } + { #1 \ #2 } + } + } + \bool_if:nT + { \l__exsheets_solutions_totoc_bool && !\l__exsheets_inside_question_bool } + { + \phantomsection + \addcontentsline { toc } { \l__exsheets_solutions_toclevel_tl } + { + \bool_if:NTF \l__exsheets_heading_toc_reversed_bool + { #2 \ #1 } + { #1 \ #2 } + } + } \coffin_typeset:Nnnnn \l__exsheets_heading_main_coffin { H } { l } { 0pt }{ 0pt } \bool_if:nT @@ -422,4 +422,4 @@ } } -\tex_endinput:D
\ No newline at end of file +\tex_endinput:D diff --git a/Master/texmf-dist/tex/latex/exsheets/tasks.sty b/Master/texmf-dist/tex/latex/exsheets/tasks.sty index 52fffde6e58..af6f1ee9fea 100644 --- a/Master/texmf-dist/tex/latex/exsheets/tasks.sty +++ b/Master/texmf-dist/tex/latex/exsheets/tasks.sty @@ -399,19 +399,23 @@ \cs_new_protected:Npn \tasks_choice: { \leavevmode - \bool_set_false:N \l__tasks_choice_checked_bool - \box_move_up:nn - { \l__tasks_choice_raise_dim } - { \hbox:n { \__tasks_choice: } } + \group_begin: + \bool_set_false:N \l__tasks_choice_checked_bool + \box_move_up:nn + { \l__tasks_choice_raise_dim } + { \hbox:n { \__tasks_choice: } } + \group_end: } \cs_new_protected:Npn \tasks_choice_checked: { \leavevmode - \bool_set_true:N \l__tasks_choice_checked_bool - \box_move_up:nn - { \l__tasks_choice_raise_dim } - { \hbox:n { \__tasks_choice: } } + \group_begin: + \bool_set_true:N \l__tasks_choice_checked_bool + \box_move_up:nn + { \l__tasks_choice_raise_dim } + { \hbox:n { \__tasks_choice: } } + \group_end: } \cs_new_protected:Npn \__tasks_choice: |