summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2013-05-27 01:40:40 +0000
committerNorbert Preining <preining@logic.at>2013-05-27 01:40:40 +0000
commiteadd78d6ef924f2410ccc83392717f1d87ee9d67 (patch)
tree2f29f6283c3c2eb8323cc55338837441eb5df9bd /Master/texmf-dist/tex/latex/exsheets/exsheets.sty
parent26cee9889d3a6331007204329d7af30c0fc70429 (diff)
excheets update 5/27
git-svn-id: svn://tug.org/texlive/trunk@30703 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.sty47
1 files changed, 30 insertions, 17 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