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.def70
1 files changed, 40 insertions, 30 deletions
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 }
+ }
}
}
}