summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def')
-rw-r--r--Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def145
1 files changed, 73 insertions, 72 deletions
diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
index 637cde2cfd0..4d29d095776 100644
--- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
+++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def
@@ -22,12 +22,6 @@
%
% 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.
% --------------------------------------------------------------------------
@@ -42,7 +36,7 @@
\coffin_new:N \l__exsheets_heading_title_coffin
\coffin_new:N \l__exsheets_heading_number_coffin
\coffin_new:N \l__exsheets_heading_points_coffin
-\coffin_new:N \l__exsheets_heading_meta_coffin
+\coffin_new:N \l__exsheets_heading_subtitle_coffin
% the object variables:
\bool_new:N \l__exsheets_heading_runin_bool
@@ -60,17 +54,21 @@
\tl_new:N \l__exsheets_heading_title_format_tl
\tl_new:N \l__exsheets_heading_title_pre_code_tl
+\tl_set:Nn \l__exsheets_heading_title_pre_code_tl { \use:n }
\tl_new:N \l__exsheets_heading_title_post_code_tl
\tl_new:N \l__exsheets_heading_number_format_tl
\tl_new:N \l__exsheets_heading_number_pre_code_tl
+\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_meta_pre_code_tl
-\tl_new:N \l__exsheets_heading_meta_post_code_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
\tl_new:N \l__exsheets_heading_points_format_tl
\tl_new:N \l__exsheets_heading_points_pre_code_tl
+\tl_set:Nn \l__exsheets_heading_points_pre_code_tl { \use:n }
\tl_new:N \l__exsheets_heading_points_post_code_tl
\tl_new:N \l__exsheets_heading_points_post_hook_tl
@@ -146,62 +144,63 @@
% #2 = number,
% #3 = points
% #4 = bonus
-\DeclareObjectType { exsheets-heading } { 4 }
+% #5 = id
+\DeclareObjectType { exsheets-heading } { 5 }
% the `default' template interface:
-\DeclareTemplateInterface { exsheets-heading } { default } { 4 }
+\DeclareTemplateInterface { exsheets-heading } { default } { 5 }
{
- inline : boolean = false ,
- runin : boolean = false ,
- indent-first : boolean = false ,
- toc-reversed : boolean = false ,
- vscale : real = 1 ,
- above : length = 2pt ,
- below : length = 2pt ,
- main : tokenlist = ,
- pre-code : tokenlist = ,
- post-code : tokenlist = ,
- title-format : tokenlist = ,
- title-pre-code : tokenlist = ,
- title-post-code : tokenlist = ,
- number-format : tokenlist = ,
- number-pre-code : tokenlist = ,
- number-post-code : tokenlist = ,
- meta-pre-code : tokenlist = ,
- meta-post-code : tokenlist = ,
- points-format : tokenlist = ,
- points-pre-code : tokenlist = ,
- points-post-code : tokenlist = ,
- join : tokenlist = ,
- attach : tokenlist =
+ inline : boolean = false ,
+ runin : boolean = false ,
+ indent-first : boolean = false ,
+ toc-reversed : boolean = false ,
+ vscale : real = 1 ,
+ above : length = 2pt ,
+ below : length = 2pt ,
+ main : tokenlist = ,
+ pre-code : tokenlist = ,
+ post-code : tokenlist = ,
+ title-format : tokenlist = ,
+ title-pre-code : tokenlist = ,
+ title-post-code : tokenlist = ,
+ number-format : tokenlist = ,
+ number-pre-code : tokenlist = ,
+ number-post-code : tokenlist = ,
+ subtitle-pre-code : tokenlist = ,
+ subtitle-post-code : tokenlist = ,
+ points-format : tokenlist = ,
+ points-pre-code : tokenlist = ,
+ points-post-code : tokenlist = ,
+ join : tokenlist = ,
+ attach : tokenlist =
}
% the `default' template code:
-\DeclareTemplateCode { exsheets-heading } { default } { 4 }
+\DeclareTemplateCode { exsheets-heading } { default } { 5 }
{
- inline = \l__exsheets_heading_inline_bool ,
- runin = \l__exsheets_heading_runin_bool ,
- indent-first = \l__exsheets_heading_indent_first_bool ,
- toc-reversed = \l__exsheets_heading_toc_reversed_bool ,
- vscale = \l__exsheets_heading_scale_fp ,
- above = \l__exsheets_heading_above_dim ,
- below = \l__exsheets_heading_below_dim ,
- main = \l__exsheets_heading_main_tl ,
- pre-code = \l__exsheets_heading_pre_code_tl ,
- post-code = \l__exsheets_heading_post_code_tl ,
- title-format = \l__exsheets_heading_title_format_tl ,
- title-pre-code = \l__exsheets_heading_title_pre_code_tl ,
- title-post-code = \l__exsheets_heading_title_post_code_tl ,
- 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 ,
- meta-pre-code = \l__exsheets_heading_meta_pre_code_tl ,
- meta-post-code = \l__exsheets_heading_meta_post_code_tl ,
- points-format = \l__exsheets_heading_points_format_tl ,
- points-pre-code = \l__exsheets_heading_points_pre_code_tl ,
- points-post-code = \l__exsheets_heading_points_post_code_tl ,
- join = \l__exsheets_heading_joined_coffins_tl ,
- attach = \l__exsheets_heading_attached_coffins_tl
+ inline = \l__exsheets_heading_inline_bool ,
+ runin = \l__exsheets_heading_runin_bool ,
+ indent-first = \l__exsheets_heading_indent_first_bool ,
+ toc-reversed = \l__exsheets_heading_toc_reversed_bool ,
+ vscale = \l__exsheets_heading_scale_fp ,
+ above = \l__exsheets_heading_above_dim ,
+ below = \l__exsheets_heading_below_dim ,
+ main = \l__exsheets_heading_main_tl ,
+ pre-code = \l__exsheets_heading_pre_code_tl ,
+ post-code = \l__exsheets_heading_post_code_tl ,
+ title-format = \l__exsheets_heading_title_format_tl ,
+ title-pre-code = \l__exsheets_heading_title_pre_code_tl ,
+ title-post-code = \l__exsheets_heading_title_post_code_tl ,
+ 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-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 ,
+ points-pre-code = \l__exsheets_heading_points_pre_code_tl ,
+ points-post-code = \l__exsheets_heading_points_post_code_tl ,
+ join = \l__exsheets_heading_joined_coffins_tl ,
+ attach = \l__exsheets_heading_attached_coffins_tl
}
{
\AssignTemplateKeys
@@ -247,7 +246,7 @@
\tl_use:N \l__exsheets_heading_title_format_tl
\strut
\tl_use:N \l__exsheets_heading_title_pre_code_tl
- { \tl_use:N \l__exsheets_heading_title_user_format_tl #1 }
+ { \tl_use:N \l_exsheets_heading_title_user_format_tl #1 }
\tl_use:N \l__exsheets_heading_title_post_code_tl
}
\hcoffin_set:Nn \l__exsheets_heading_number_coffin
@@ -257,28 +256,29 @@
{ \tl_use:N \l__exsheets_heading_number_format_tl }
\strut
\tl_use:N \l__exsheets_heading_number_pre_code_tl
- { \tl_use:N \l__exsheets_heading_title_user_format_tl #2 }
+ { \tl_use:N \l_exsheets_heading_title_user_format_tl #2 }
\tl_use:N \l__exsheets_heading_number_post_code_tl
}
- % TODO: if questions are included via \includequestions
- % \g__exsheets_questions_current_id_tl doesn't hold the current ID any
- % more when the questions are typeset
- \hcoffin_set:Nn \l__exsheets_heading_meta_coffin
+ \hcoffin_set:Nn \l__exsheets_heading_subtitle_coffin
{
- \prop_get:NoNT \g__exsheets_questions_meta_prop
- { \g__exsheets_questions_current_id_tl }
- \l__exsheets_questions_meta_tl
+ \prop_get:NnNT \g__exsheets_questions_subtitle_prop
+ { #5 }
+ \l__exsheets_questions_subtitle_tl
{
- \tl_use:N \l__exsheets_heading_meta_pre_code_tl
- \tl_use:N \l__exsheets_questions_meta_tl
- \tl_use:N \l__exsheets_heading_meta_post_code_tl
+ \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
+ }
+ \tl_use:N \l__exsheets_heading_subtitle_post_code_tl
}
}
\hcoffin_set:Nn \l__exsheets_heading_points_coffin
{
\bool_if:NTF \l__exsheets_parse_points_bool
{
- \bool_if:nF { \fp_compare_p:n { #3 = 0 } && \fp_compare_p:n { #4 = 0 } }
+ \bool_if:nF
+ { \fp_compare_p:n { #3 = 0 } && \fp_compare_p:n { #4 = 0 } }
{
\tl_use:N \l__exsheets_heading_points_format_tl
\group_begin:
@@ -296,7 +296,8 @@
{ \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 } }
+ \bool_if:nT
+ { !\fp_compare_p:n { #3 = 0 } && !\fp_compare_p:n { #4 = 0 } }
{ ~ }
\fp_compare:nF { #4 = 0 }
{