summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-08 22:01:25 +0000
committerKarl Berry <karl@freefriends.org>2013-12-08 22:01:25 +0000
commit8a0e29b0e58b2bc46dd9227f4d3e6c009414306c (patch)
tree40ffbbd012bc89a8ddfa2080910cdcf0bd84db2a /Master
parentd43ee48953990b7021d39c2b086fa43d079fdd3b (diff)
exsheets (8dec13)
git-svn-id: svn://tug.org/texlive/trunk@32363 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/README4
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdfbin666983 -> 666585 bytes
-rw-r--r--Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex19
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets.sty62
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def70
5 files changed, 93 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README
index 5ceae383aaa..9fa12aa74ae 100644
--- a/Master/texmf-dist/doc/latex/exsheets/README
+++ b/Master/texmf-dist/doc/latex/exsheets/README
@@ -1,7 +1,7 @@
--------------------------------------------------------------------------
-EXSHEETS 2013/12/03
+EXSHEETS 2013/12/08
bundled packages:
-the EXSHEETS package v0.12
+the EXSHEETS package v0.12a
Yet another package for the creation of exercise sheets
the EXSHEETS-LISTINGS package v0.2
Using listings in exsheets
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
index 624c25da908..4baefccbf38 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
index f8fa3f14b60..09d853ff8a3 100644
--- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
+++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex
@@ -396,10 +396,20 @@ proposes a solution for the problem of using verbatim material in \ExSheets'
\env{question} and \env{solution} environments. It is presented in
part~\ref{part:listings}.
+Question now can get subtitles that are printed if the heading instance
+supports it, see section~\ref{sec:subtitles-questions}.
+
\subsection{Version 0.11}
The commands \cs{GetQuestionClass} and \cs{PrintQuestionClassTF} have been
added. They're explained in section~\ref{sec:retr-class-value}.
+\subsection{Version 0.12}
+The \option{auto-label} is now more flexible to allow the use together with
+packages \pkg{cleveref}.
+
+Question properties can now be retrieved before the question is printed (by
+writing the properties to the \code{aux} file).
+
\section{Thanks}
I need to thank the many users who gave me feedback so far! For one thing
this shows me that \ExSheets\ is useful to people. It also led to many
@@ -470,7 +480,7 @@ The package \ExSheets\ has some options, namely the following ones:
\keyval{headings-format}{code}\Default{\cs*{normalsize}\cs*{bfseries}}
This code is placed immediately before the headings of the questions and
solutions.
- \keyval{subtitle-format}{code}\Default{\cs*{normalsize}\cs*{bfseries}\cs*{itshape}}
+ \keyval{subtitle-format}{code}\Default{\cs*{normalsize}\cs*{itshape}}
This code is placed immediately before the subtitle of the questions and
solutions. It only has an effect with a title instance that uses the
subtitle coffin, see section~\ref{sec:exsheets-headings}.
@@ -637,7 +647,7 @@ for example useful when you want to print a sample solution for an exam. With
\keyis{use}{false} it is fully discarded which means it is not accessible
through an \acs{id} and a possible solution will not be saved.
-\subsection{Subtitles to Questions}
+\subsection{Subtitles to Questions}\label{sec:subtitles-questions}
The \option{subtitle} option mentioned in section~\ref{sec:opti-ques-envir}
can be used to add a subtitle to a question. However, unless you choose a
suitable heading (see section~\ref{sec:exsheets-headings}) it won't be
@@ -887,7 +897,7 @@ each. You have two possibilities to display and count them:
\keybool{separate-bonus}\Module{points}\Default{false}
This option determines whether points and bonus points each get their own
unit when they appear together (in the margin or with \cs{totalpoints}).
- \keyval{pre-bonus}{tokens}\Module{points}\Default{(+}
+ \keyval{pre-bonus}{tokens}\Module{points}\Default{\cs*{space}(+}
Code to be inserted before the bonus points when they follow normal
points.
\keyval{post-bonus}{tokens}\Module{points}\Default{)}
@@ -1713,6 +1723,7 @@ template interface:
number-format : tokenlist = ,
number-pre-code : tokenlist = ,
number-post-code : tokenlist = ,
+ subtitle-format : tokenlist = ,
subtitle-pre-code : tokenlist = ,
subtitle-post-code : tokenlist = ,
points-format : tokenlist = ,
@@ -2216,7 +2227,7 @@ Text before
title-format = \large\scshape\color{exsheetsred} ,
number-format = \large\bfseries\color{exsheetsblue} ,
points-format = \itshape ,
- join = { number[r,B] title[l,B] (.333em,0pt) } ,
+ join = { number[r,B]title[l,B](.333em,0pt) } ,
attach =
{
main[hc,vc]number[hc,vc](0pt,0pt) ;
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
index 7a67093fe33..033507e03a0 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty
@@ -25,8 +25,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% ----------------------------------------------------------------------------
-\def\exsheets@date{2013/12/02}
-\def\exsheets@version{0.12}
+\def\exsheets@date{2013/12/08}
+\def\exsheets@version{0.12a}
\RequirePackage { expl3 , xparse }
\ProvidesExplPackage
@@ -226,8 +226,8 @@
\tl_new:N \l__exsheets_solution_heading_instance_tl
\tl_new:N \l_exsheets_heading_title_user_format_tl
\tl_set:Nn \l_exsheets_heading_title_user_format_tl { \normalsize\bfseries }
-\tl_new:N \l_exsheets_subtitle_format_tl
-\tl_set:Nn \l_exsheets_subtitle_format_tl { \normalsize\bfseries\itshape }
+\tl_new:N \l_exsheets_heading_subtitle_user_format_tl
+\tl_set:Nn \l_exsheets_heading_subtitle_user_format_tl { \normalsize\itshape }
\tl_new:N \l__exsheets_questions_toclevel_tl
\tl_set:Nn \l__exsheets_questions_toclevel_tl { subsection }
\tl_new:N \l__exsheets_solutions_toclevel_tl
@@ -252,7 +252,8 @@
load-headings .bool_set:N = \l__exsheets_load_headings_bool ,
headings-format .tl_set:N =
\l_exsheets_heading_title_user_format_tl ,
- subtitle-format .tl_set:N = \l_exsheets_subtitle_format_tl ,
+ subtitle-format .tl_set:N =
+ \l_heading_exsheets_subtitle_user_format_tl ,
load-tasks .bool_set:N = \l__exsheets_load_tasks_bool ,
use-ref .bool_set:N = \l__exsheets_solutions_by_ref_bool ,
totoc .choice: ,
@@ -309,7 +310,7 @@
\tl_new:N \l__exsheets_points_number_format_tl
\tl_new:N \l__exsheets_bonus_number_format_tl
\tl_new:N \l__exsheets_points_pre_bonus_marker_tl
-\tl_set:Nn \l__exsheets_points_pre_bonus_marker_tl { (+ }
+\tl_set:Nn \l__exsheets_points_pre_bonus_marker_tl { \space(+ }
\tl_new:N \l__exsheets_points_post_bonus_marker_tl
\tl_set:Nn \l__exsheets_points_post_bonus_marker_tl { ) }
\tl_new:N \l__exsheets_points_format_tl
@@ -542,29 +543,34 @@
\NewDocumentCommand \totalpoints { s }
{
- \exsheets_totalpoints:
- \IfBooleanF { #1 }
+ \group_begin:
+ \tl_use:N \l__exsheets_points_format_tl
{
- \bool_if:nT
+ \exsheets_totalpoints:
+ \IfBooleanF { #1 }
{
- \l__exsheets_points_separate_bonus_bool ||
- \fp_compare_p:n { \g_exsheets_total_bonus_fp = 0 }
+ \bool_if:nT
+ {
+ \l__exsheets_points_separate_bonus_bool ||
+ \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 }
+ \exsheets_totalbonus:
+ \IfBooleanF { #1 }
{
- \bool_if:NTF \l__exsheets_points_separate_bonus_bool
- { \exsheets_bonus_name:n { \g_exsheets_total_bonus_fp } }
+ \fp_compare:nF { \g_exsheets_total_bonus_fp = 0 }
{
- \exsheets_points_name:n
- { \g_exsheets_total_points_fp + \g_exsheets_total_bonus_fp }
+ \bool_if:NTF \l__exsheets_points_separate_bonus_bool
+ { \exsheets_bonus_name:n { \g_exsheets_total_bonus_fp } }
+ {
+ \exsheets_points_name:n
+ { \g_exsheets_total_points_fp + \g_exsheets_total_bonus_fp }
+ }
}
}
}
+ \group_end:
}
\exsheets_depr_cmd:nn { \sumpoints } { \totalpoints* }
@@ -589,7 +595,6 @@
{
\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 }
@@ -611,7 +616,7 @@
pre-bonus .tl_set:N = \l__exsheets_points_pre_bonus_marker_tl ,
post-bonus .tl_set:N = \l__exsheets_points_post_bonus_marker_tl ,
use-name .bool_set:N = \l__exsheets_points_name_bool ,
- format .tl_set:N = \l__exsheets_points_format_tl ,
+ format .tl_set:N = \l__exsheets_points_format_tl ,
number-format .tl_set:N = \l__exsheets_points_number_format_tl ,
bonus-format .tl_set:N = \l__exsheets_bonus_number_format_tl ,
parse .bool_set:N = \l__exsheets_parse_points_bool ,
@@ -1143,8 +1148,8 @@
{
\exsheets_set_question_properties:x
{ subtitle = { \exp_not:V \l__exsheets_questions_subtitle_tl } }
- % FIXME: rather useless since it isn't used at all, see also
- % exsheets_headings.def
+ % this is used in the headings instance; could maybe be replaced
+ % by retrieving the property...
% \prop_gput:NVV \g__exsheets_questions_subtitle_prop
% \g__exsheets_questions_current_id_tl
% \l__exsheets_questions_subtitle_tl
@@ -2898,6 +2903,7 @@ HISTORY:
- changed horizontal spaces declared as `1ex' into
`.3333em' in the declarations of the headings
instances
+ - added subtitles
2013/11/07 v0.10a - fix bug in loading headings of questions; when
included from an external file sometimes the wrong ID
has been passed to the headings
@@ -2912,7 +2918,7 @@ HISTORY:
retrieved before the corresponding question is
printed
- make \GetQuestionProperty expandable
- - new syntax featture in points argument: a leading
+ - new syntax feature in points argument: a leading
bang prevents the points from being added to the sum
of points
- added possibility for
@@ -2920,6 +2926,10 @@ HISTORY:
- added \IfQuestionSubtitle(TF)
- added `subtitle' property
- dropped `color' option
+2013/12/08 v0.12a - changed details in the printing mechanism of the
+ points which seems to be more consistent
+ - fix bug introduced in the last update: subtitles work
+ again
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TODO:
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
index 4d29d095776..7c79be05be9 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
@@ -62,6 +62,7 @@
\tl_set:Nn \l__exsheets_heading_number_pre_code_tl { \use:n }
\tl_new:N \l__exsheets_heading_number_post_code_tl
+\tl_new:N \l__exsheets_heading_subtitle_format_tl
\tl_new:N \l__exsheets_heading_subtitle_pre_code_tl
\tl_set:Nn \l__exsheets_heading_subtitle_pre_code_tl { \use:n }
\tl_new:N \l__exsheets_heading_subtitle_post_code_tl
@@ -166,6 +167,7 @@
number-format : tokenlist = ,
number-pre-code : tokenlist = ,
number-post-code : tokenlist = ,
+ subtitle-format : tokenlist = ,
subtitle-pre-code : tokenlist = ,
subtitle-post-code : tokenlist = ,
points-format : tokenlist = ,
@@ -194,6 +196,7 @@
number-format = \l__exsheets_heading_number_format_tl ,
number-pre-code = \l__exsheets_heading_number_pre_code_tl ,
number-post-code = \l__exsheets_heading_number_post_code_tl ,
+ subtitle-format = \l__exsheets_heading_title_format_tl ,
subtitle-pre-code = \l__exsheets_heading_subtitle_pre_code_tl ,
subtitle-post-code = \l__exsheets_heading_subtitle_post_code_tl ,
points-format = \l__exsheets_heading_points_format_tl ,
@@ -261,14 +264,18 @@
}
\hcoffin_set:Nn \l__exsheets_heading_subtitle_coffin
{
- \prop_get:NnNT \g__exsheets_questions_subtitle_prop
- { #5 }
- \l__exsheets_questions_subtitle_tl
+ \exsheets_if_question_subtitle:T
{
+ \tl_if_blank:VTF \l__exsheets_heading_subtitle_format_tl
+ { \tl_use:N \l__exsheets_heading_title_format_tl }
+ { \tl_use:N \l__exsheets_heading_subtitle_format_tl }
+ \strut
\tl_use:N \l__exsheets_heading_subtitle_pre_code_tl
{
- \tl_use:N \l_exsheets_subtitle_format_tl
- \tl_use:N \l__exsheets_questions_subtitle_tl
+ \group_begin:
+ \tl_use:N \l_exsheets_heading_subtitle_user_format_tl
+ \exsheets_get_question_property:nn { subtitle } { #5 }
+ \group_end:
}
\tl_use:N \l__exsheets_heading_subtitle_post_code_tl
}
@@ -286,35 +293,38 @@
\group_end:
\tl_use:N \l__exsheets_heading_points_pre_code_tl
{
- \fp_compare:nF { #3 = 0 }
+ \tl_use:N \tl_use:N \l__exsheets_points_format_tl
{
- \bool_if:nTF
+ \fp_compare:nF { #3 = 0 }
{
- \l__exsheets_points_separate_bonus_bool ||
- \fp_compare_p:n { #4 = 0 }
- }
- { \exsheets_print_points:n { #3 } }
- { \exsheets_parse_points:n { #3 } }
- }
- \bool_if:nT
- { !\fp_compare_p:n { #3 = 0 } && !\fp_compare_p:n { #4 = 0 } }
- { ~ }
- \fp_compare:nF { #4 = 0 }
- {
- \tl_use:N \l__exsheets_points_pre_bonus_marker_tl
- \bool_if:nTF
- {
- \l__exsheets_points_separate_bonus_bool ||
- \fp_compare_p:n { #3 = 0 }
- }
- {
- \exsheets_print_bonus:n { #4 }
- \tl_use:N \l__exsheets_points_post_bonus_marker_tl
+ \bool_if:nTF
+ {
+ \l__exsheets_points_separate_bonus_bool ||
+ \fp_compare_p:n { #4 = 0 }
+ }
+ {
+ \exsheets_parse_points:n { #3 }
+ \exsheets_points_name:n { #3 }
+ }
+ { \exsheets_parse_points:n { #3 } }
}
+ \fp_compare:nF { #4 = 0 }
{
- \exsheets_parse_bonus:n { #4 }
- \tl_use:N \l__exsheets_points_post_bonus_marker_tl
- \exsheets_points_name:n { #3 + #4 }
+ \tl_use:N \l__exsheets_points_pre_bonus_marker_tl
+ \bool_if:nTF
+ {
+ \l__exsheets_points_separate_bonus_bool ||
+ \fp_compare_p:n { #3 = 0 }
+ }
+ {
+ \exsheets_print_bonus:n { #4 }
+ \tl_use:N \l__exsheets_points_post_bonus_marker_tl
+ }
+ {
+ \exsheets_parse_bonus:n { #4 }
+ \tl_use:N \l__exsheets_points_post_bonus_marker_tl
+ \exsheets_points_name:n { #3 + #4 }
+ }
}
}
}