summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-17 22:11:15 +0000
committerKarl Berry <karl@freefriends.org>2013-07-17 22:11:15 +0000
commitf4ee7dde5f0c6c40a915cab1611912f70c73df3f (patch)
tree80d5f553c3f85a2f5d9af7ecce621016a8045753 /Master/texmf-dist/tex/latex/exsheets/exsheets.sty
parentab68c2c47235b190265d422222a53f0c338212ab (diff)
exsheets (17jul13)
git-svn-id: svn://tug.org/texlive/trunk@31218 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.sty160
1 files changed, 81 insertions, 79 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index 9d899f2d815..64ce0f3e650 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
@@ -22,17 +22,11 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% ----------------------------------------------------------------------------
-% The exsheets package consists of the files
-% - exsheets.sty, exsheets_headings.def, exsheets_headings.cfg,
-% exsheets_tasks.def, exsheets_tasks.cfg, exsheets_configurations.cfg,
-% - exsheets_en.tex, exsheets_en.pdf,
-% - README
-% ----------------------------------------------------------------------------
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% ----------------------------------------------------------------------------
-\def\exsheets@date{2013/06/28}
-\def\exsheets@version{0.9h}
+\def\exsheets@date{2013/07/17}
+\def\exsheets@version{0.9i}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -269,10 +263,12 @@
\fp_new:N \l__exsheets_points_default_fp
\fp_set:Nn \l__exsheets_points_default_fp { 1 }
\fp_new:N \l__exsheets_question_points_fp
-\fp_new:N \g__exsheets_total_points_fp
+% this one should be public:
+\fp_new:N \g_exsheets_total_points_fp
\fp_new:N \g__exsheets_bonus_sum_fp
\fp_new:N \l__exsheets_question_bonus_fp
-\fp_new:N \g__exsheets_total_bonus_fp
+% this one should be public
+\fp_new:N \g_exsheets_total_bonus_fp
\tl_new:N \l__exsheets_points_name_tl
\tl_set:Nn \l__exsheets_points_name_tl { P. }
@@ -333,10 +329,10 @@
\cs_generate_variant:Nn \exsheets_add_bonus:n { V }
\cs_new_protected_nopar:Npn \exsheets@sum@of@points #1
- { \fp_gset:Nn \g__exsheets_total_points_fp { #1 } }
+ { \fp_gset:Nn \g_exsheets_total_points_fp { #1 } }
\cs_new_protected_nopar:Npn \exsheets@sum@of@bonus #1
- { \fp_gset:Nn \g__exsheets_total_bonus_fp { #1 } }
+ { \fp_gset:Nn \g_exsheets_total_bonus_fp { #1 } }
\cs_new_nopar:Npn \exsheets_parse_points:n #1
{
@@ -477,8 +473,8 @@
\bool_if:NTF \l__exsheets_parse_points_bool
{
\IfBooleanTF { #1 }
- { \exsheets_parse_points:n { \g__exsheets_total_points_fp } }
- { \exsheets_print_points:n { \g__exsheets_total_points_fp } }
+ { \exsheets_parse_points:n { \g_exsheets_total_points_fp } }
+ { \exsheets_print_points:n { \g_exsheets_total_points_fp } }
}
{ \msg_warning:nnn { exsheets } { parse-points } { \pointssum } }
}
@@ -488,8 +484,8 @@
\bool_if:NTF \l__exsheets_parse_points_bool
{
\IfBooleanTF { #1 }
- { \exsheets_parse_bonus:n { \g__exsheets_total_bonus_fp } }
- { \exsheets_print_bonus:n { \g__exsheets_total_bonus_fp } }
+ { \exsheets_parse_bonus:n { \g_exsheets_total_bonus_fp } }
+ { \exsheets_print_bonus:n { \g_exsheets_total_bonus_fp } }
}
{ \msg_warning:nnn { exsheets } { parse-points } { \bonussum } }
}
@@ -524,20 +520,20 @@
\bool_if:nT
{
\l__exsheets_points_separate_bonus_bool ||
- \fp_compare_p:n { \g__exsheets_total_bonus_fp = 0 }
+ \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 }
+ \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 }
{
\bool_if:NTF \l__exsheets_points_separate_bonus_bool
- { \exsheets_bonus_name:n { \g__exsheets_total_bonus_fp } }
+ { \exsheets_bonus_name:n { \g_exsheets_total_bonus_fp } }
{
\exsheets_points_name:n
- { \g__exsheets_total_points_fp + \g__exsheets_total_bonus_fp }
+ { \g_exsheets_total_points_fp + \g_exsheets_total_bonus_fp }
}
}
}
@@ -549,11 +545,11 @@
{
\bool_if:NTF \l__exsheets_parse_points_bool
{
- \fp_compare:nTF { \g__exsheets_total_points_fp = 0 }
+ \fp_compare:nTF { \g_exsheets_total_points_fp = 0 }
{ ?? \, \exsheets_points_name:n { ?? } }
{
\exsheets_parse_points:n
- { \g__exsheets_total_points_fp }
+ { \g_exsheets_total_points_fp }
}
}
{ \msg_warning:nn { exsheets } { totalpoints } }
@@ -563,12 +559,12 @@
{
\bool_if:NT \l__exsheets_parse_points_bool
{
- \fp_compare:nF { \g__exsheets_total_bonus_fp = 0 }
+ \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 }
+ { \g_exsheets_total_bonus_fp }
\tl_use:N \l__exsheets_points_post_bonus_marker_tl
}
}
@@ -703,7 +699,7 @@
\bool_if:NTF { \l__exsheets_grades_half_bool }
{ \__exsheets_fp_round_to_half:n }
{ \__exsheets_grades_round:n }
- { \g__exsheets_total_points_fp * \l__exsheets_tmpa_fp }
+ { \g_exsheets_total_points_fp * \l__exsheets_tmpa_fp }
}
\cs_new:Npn \exsheets_strip_braces:N #1
@@ -742,11 +738,11 @@
\bool_if:NTF \l__exsheets_parse_points_bool
{
\exsheets_parse_points:n
- { min( \__exsheets_grade_rounded: , \g__exsheets_total_points_fp ) }
+ { min( \__exsheets_grade_rounded: , \g_exsheets_total_points_fp ) }
\int_compare:nT { #1 = 1 }
{
\exsheets_points_name:n
- { min( \__exsheets_grade_rounded: , \g__exsheets_total_points_fp ) }
+ { min( \__exsheets_grade_rounded: , \g_exsheets_total_points_fp ) }
}
}
{ \msg_warning:nnn { exsheets } { grade-parse } { #1 } \textbf{??} }
@@ -2442,23 +2438,19 @@
{
\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 }
- {
- \dim_compare:nT { \l__exsheets_tmpb_dim > 0pt } { \vfil }
- \break
- \IfBooleanF { #1 }
- {
- \dim_sub:Nn \l__exsheets_tmpa_dim { \l__exsheets_tmpb_dim }
- \vspace* { \l__exsheets_tmpa_dim }
- }
- }
- { \skip_vertical:N \l__exsheets_tmpa_dim }
-% \group_end:
+ \dim_set:Nn \l__exsheets_tmpa_dim { #2 }
+ \dim_set:Nn \l__exsheets_tmpb_dim { \pagegoal - \pagetotal - \baselineskip }
+ \dim_compare:nTF { \l__exsheets_tmpa_dim > \l__exsheets_tmpb_dim }
+ {
+ \dim_compare:nT { \l__exsheets_tmpb_dim > 0pt } { \vfil }
+ \break
+ \IfBooleanF { #1 }
+ {
+ \dim_sub:Nn \l__exsheets_tmpa_dim { \l__exsheets_tmpb_dim }
+ \vspace* { \l__exsheets_tmpa_dim }
+ }
+ }
+ { \skip_vertical:N \l__exsheets_tmpa_dim }
}
\NewDocumentCommand \examspace { sm }
{ \__exsheets_examspace:nn { #1 } { #2 } }
@@ -2579,38 +2571,41 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HISTORY:
2011/11/23 v0.1pre - first upload to bitbucket and all changes until
- considered stable enough/ready to be called 0.1alpha.
- There'll be no further descriptions until then.
+ considered stable enough/ready to be called
+ 0.1alpha. There'll be no further descriptions until
+ then.
2012/06/08 v0.1alpha - first hopefully stable version
2012/06/11 v0.1alpha-a - added headings instances, slightly rewritten
`exercises-tasks' object and `tasks' environment
-2012/06/11 v0.1alpha-b - added `multiplechoice' instance and `load-tasks' option
+2012/06/11 v0.1alpha-b - added `multiplechoice' instance and `load-tasks'
+ option
2012/06/12 v0.1alpha-c - renamed from `exercises' into `ExSheets'
2012/06/15 v0.1alpha-d - added more flexible solution printing method
-2012/06/15 v0.1beta - filled in some blanks in the documentation, now we need
- some testing!
+2012/06/15 v0.1beta - filled in some blanks in the documentation, now we
+ need some testing!
2012/09/07 v0.1beta-a - adjustments to the updated l3kernel
2012/09/08 v0.1beta-b - sort solutions printed with the `byID' key
2012/09/16 v0.1beta-c - renamed option `questions-counter-format' into
`counter-format'
-2012/09/19 v0.1beta-d - added `topic' key, provide \includequestions with options
- `all' and `IDs'
-2012/09/24 v0.1beta-e - added question properties and improved random question
- selection
-2012/09/27 v0.1 - added two headings instances, new option `headings-format'
- - small changes in the definition of the `exsheets-headings'
- object
+2012/09/19 v0.1beta-d - added `topic' key, provide \includequestions with
+ options `all' and `IDs'
+2012/09/24 v0.1beta-e - added question properties and improved random
+ question selection
+2012/09/27 v0.1 - added two headings instances, new option
+ `headings-format'
+ - small changes in the definition of the
+ `exsheets-headings' object
- preliminary version of totoc options. Unfortunatly
\exsheets@recover@number is not expandable => no
hyperref support
-2012/09/30 v0.2beta - version numbering gone crazy! this will now stay 0.2beta
- until upload to CTAN (v0.2)
+2012/09/30 v0.2beta - version numbering gone crazy! this will now stay
+ 0.2beta until upload to CTAN (v0.2)
- integrated packages `translations' and `cntformats':
trnslt: provide expandable version of `translator's
\translate
- cntfmts: outsourced previous counter formatting commands;
- should now be usable in other packages, too, and
- simplified definitions in `ExSheets'
+ cntfmts: outsourced previous counter formatting
+ commands; should now be usable in other packages,
+ too, and simplified definitions in `ExSheets'
- thanks to `translations' and `cntformats' the `totoc'
option now works with `hyperref'
2012/10/05 v0.2 - removed \sumpoints and moved the functionality to
@@ -2625,8 +2620,8 @@ HISTORY:
using \exsheets@save@number and \QuestionNumber
2012/10/08 v0.2b - improved the reference to chapter/solution numbers
in \printsolutions
- - resolved bug in \printsolutions introduced in the last
- update
+ - resolved bug in \printsolutions introduced in the
+ last update
- upload to CTAN
2012/10/23 v0.3 - bugfix in \exref
@@ -2643,17 +2638,17 @@ HISTORY:
2012/12/02 v0.5 - added \CurrentQuestionID
2012/12/06 v0.5a - bug fix: solutions had wrong numbers with
counter-format=se.qu and [print] option
-2012/12/18 v0.6 - variations, Hungarian translations, corrected Catalanian
- translations
-2012/12/23 v0.6a - bug fix: labels and items of {tasks} weren't joined at
- their baselines
+2012/12/18 v0.6 - variations, Hungarian translations, corrected
+ Catalanian translations
+2012/12/23 v0.6a - bug fix: labels and items of {tasks} weren't joined
+ at their baselines
2013/01/06 v0.6b - bug fix: ID counting fixed in \includequestions
-2013/01/19 v0.7 - extracted `tasks' environment into standalone package;
- this also lead to a slightly new syntax and a few new
- options for it
+2013/01/19 v0.7 - extracted `tasks' environment into standalone
+ package; this also lead to a slightly new syntax and
+ a few new options for it
- changed internals for random selection of questions:
- uses `pgf' instead of `lcg' and seems to be more reliable
- than before
+ uses `pgf' instead of `lcg' and seems to be more
+ reliable 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
@@ -2686,19 +2681,26 @@ HISTORY:
2013/04/25 v0.9d - bug fix: \includequestions works correctly when used
multiple times together with ordinary instances of
the {question} environment
- - bug fix: points/parse=false correctly disables parsing
- points again
- - bug fix: \addpoints didn't add to the question property
+ - bug fix: points/parse=false correctly disables
+ parsing points again
+ - bug fix: \addpoints didn't add to the question
+ property
- 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)
+ - \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
2013/05/30 v0.9g - obey \if@filesw
-2013/06/28 v0.9h - cleaner internal use of \exsheets_set_question_properties:n
+2013/06/28 v0.9h - cleaner internal use of
+ \exsheets_set_question_properties:n
+2013/07/17 v0.9i - made \g__exsheets_total_bonus_fp and
+ \g__exsheets_total_points_fp public
+ - removed `translations' from the bundle
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO: