From 58281f233aa382e37f0e840e29a978aa95cc3f85 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 4 Dec 2012 00:08:31 +0000 Subject: exsheets (3dec12) git-svn-id: svn://tug.org/texlive/trunk@28436 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/exsheets/README | 2 +- .../texmf-dist/doc/latex/exsheets/exsheets_en.pdf | Bin 713108 -> 649290 bytes .../texmf-dist/doc/latex/exsheets/exsheets_en.tex | 83 +++++++++++-- Master/texmf-dist/tex/latex/exsheets/exsheets.sty | 132 ++++++++++++++++----- .../tex/latex/exsheets/exsheets_headings.cfg | 37 ++++++ .../tex/latex/exsheets/exsheets_headings.def | 56 +++++++-- 6 files changed, 257 insertions(+), 53 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/exsheets/README b/Master/texmf-dist/doc/latex/exsheets/README index 0a082e1f372..9d490dd6f14 100644 --- a/Master/texmf-dist/doc/latex/exsheets/README +++ b/Master/texmf-dist/doc/latex/exsheets/README @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -EXSHEETS v0.4 - 2012/11/08 +EXSHEETS v0.5 - 2012/12/02 bundled packages: the EXSHEETS package diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf index 16fb782c201..7676d1c0572 100644 Binary files a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf and b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.pdf differ diff --git a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex index 1c7fdfe63f1..9add39fd108 100644 --- a/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex +++ b/Master/texmf-dist/doc/latex/exsheets/exsheets_en.tex @@ -198,7 +198,6 @@ % ---------------------------------------------------------------------------- % example definitions that have to be done in the preamble: -\DeclareQuestionProperty{points} \DeclareQuestionProperty{notes} \DeclareQuestionProperty{reference} \DeclareQuestionProperty{topic} @@ -940,9 +939,12 @@ Please be aware that the labels must be processed in a previous \LaTeX\ run befo \subsubsection{Print by \texorpdfstring{\acs{id}}{ID}}\label{ssec:ids}\secidx[print!by ID]{solutions} Now comes the best part: you can also print selected solutions! Every question -has an \acs{id}. To see which \acs{id} a question has you can call the following command: +has an \acs{id}. To see which \acs{id} a question has you can call the following +command: \begin{beschreibung} \Befehl{DebugExSheets}{true|false} + \befehl{CurrentQuestionID} \sinceversion{0.4a}expands to the current question + \acs{id} (after two expansions). \end{beschreibung} Let's create some more questions and take a look what this command does: \begin{beispiel} @@ -1057,14 +1059,16 @@ Now the commands for recovering the properties: Of course the property must have been declared before. \end{beschreibung} -Let's say we have declared the properties \code{points}, \code{notes}, \code{reference} -and \code{topic}. Then we can do the following: +Let's say we have declared the properties \code{notes}, \code{reference} +and \code{topic}. By default the property \code{points} is available and gets the +value of the optional argument of the \code{question} environment. + +We can now do the following: \begin{beispiel} % uses `biblatex' \begin{question}[ID=center,topic=LaTeX]{3} Explain how you could center text in a \LaTeX\ document. \SetQuestionProperties{ - points = 3, topic = \TeX/\LaTeX , notes = {How to center text.}, reference = {\textcite{companion}}} @@ -1078,7 +1082,6 @@ and \code{topic}. Then we can do the following: \begin{question}[ID=knuthbooks,topic=LaTeX]{2} Name two books by D.\,E.\,Knuth. \SetQuestionProperties{ - points = 2, topic = \TeX/\LaTeX , notes = {Books by Knuth.}, reference = {\textcite{knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,knuth:ct:e}}} @@ -1549,6 +1552,7 @@ of their usage. The options are listed in the definition for the template interf \DeclareTemplateInterface{exsheets-heading}{default}{3} { % option : type = default + inline : boolean = false , runin : boolean = false , indent-first : boolean = false , toc-reversed : boolean = false , @@ -1752,6 +1756,7 @@ available through the option \key{headings}{}. A `block-nr-wp' heading. \sample \end{question} +\newpage% FIXME \subsubsection{The `runin-rev' Instance} \begin{beispiel}[code only] \DeclareInstance{exsheets-heading}{runin-rev}{default} @@ -1793,6 +1798,7 @@ available through the option \key{headings}{}. A `runin-wp' heading. \sample \end{question} +\newpage% FIXME \subsubsection{The `runin-wp-rev' Instance} \begin{beispiel}[code only] \DeclareInstance{exsheets-heading}{runin-wp-rev}{default} @@ -1814,7 +1820,6 @@ available through the option \key{headings}{}. A `runin-wp-rev' heading. \sample \end{question} -\newpage \subsubsection{The `runin-nr' Instance} \begin{beispiel}[code only] \DeclareInstance{exsheets-heading}{runin-nr}{default} @@ -1868,6 +1873,70 @@ available through the option \key{headings}{}. A `runin-nr-wp' heading. \sample \end{question} +\subsubsection{The `inline' Instance} +\sinceversion{0.5} +\begin{beispiel}[code only] + \DeclareInstance{exsheets-heading}{inline}{default} + { + inline = true , + number-pre-code = \space , + number-post-code = \space , + join = + { + main[r,vc]title[r,vc](0pt,0pt) ; + main[r,vc]number[l,vc](0pt,0pt) + } + } +\end{beispiel} +\SetupExSheets{headings=inline} +Text before +\begin{question}{1} + An `inline' heading. \sample +\end{question} + Text after + +\subsubsection{The `inline-wp' Instance} +\sinceversion{0.5} +\begin{beispiel}[code only] + \DeclareInstance{exsheets-heading}{inline-wp}{default} + { + inline = true , + number-pre-code = \space , + number-post-code = \space , + points-pre-code = ( , + points-post-code = )\space , + join = + { + main[r,vc]title[r,vc](0pt,0pt) ; + main[r,vc]number[l,vc](0pt,0pt) ; + main[r,vc]points[l,vc](0pt,0pt) + } + } +\end{beispiel} +\SetupExSheets{headings=inline-wp} +Text before +\begin{question}{1} + An `inline-wp' heading. \sample +\end{question} + Text after + +\subsubsection{The `inline-nr' Instance} +\sinceversion{0.5} +\begin{beispiel}[code only] + \DeclareInstance{exsheets-heading}{inline-nr}{default} + { + inline = true , + number-post-code = \space , + join = { main[r,vc]number[l,vc](0pt,0pt) } + } +\end{beispiel} +\SetupExSheets{headings=inline-nr} +Text before +\begin{question}{1} + An `inline-nr' heading. \sample +\end{question} + Text after + \subsubsection{The `centered' Instance} \begin{beispiel}[code only] \DeclareInstance{exsheets-heading}{centered}{default} diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets.sty b/Master/texmf-dist/tex/latex/exsheets/exsheets.sty index ac5272f23aa..4d3c3481917 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{2012/11/08} -\def\exsheets@version{0.4} +\def\exsheets@date{2012/12/02} +\def\exsheets@version{0.5} \RequirePackage { expl3 , xparse } \ProvidesExplPackage @@ -151,6 +151,8 @@ \tl_new:N \l__exsheets_heading_instance_tl \tl_set:Nn \l__exsheets_heading_instance_tl { block } +\tl_new:N \l__exsheets_question_heading_instance_tl +\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_questions_toclevel_tl @@ -807,13 +809,19 @@ \cs_new:Npn \IfInsideQuestionF { \bool_if:NF \l__exsheets_inside_question_bool } +\cs_new_eq:NN \exsheets_par: \par + \NewEnviron { __exsheets_questions_internal: } { \csappto { BODY } { - \par - \dim_compare:nNnT { \parskip } = { 0pt } - { \exsheets_glue:N \l__exsheets_questions_skip_below_dim } + \cs_if_eq:NNTF \exsheets_par: \scan_stop: + { \c_space_tl } + { + \exsheets_par: + \dim_compare:nNnT { \parskip } = { 0pt } + { \exsheets_glue:N \l__exsheets_questions_skip_below_dim } + } } \bool_if:nT { @@ -828,10 +836,12 @@ } \prop_new:N \g__exsheets_questions_id_prop +\prop_new:N \g__exsheets_questions_meta_prop \prop_new:N \g__exsheets_questions_used_prop \int_new:N \g__exsheets_questions_used_int \tl_new:N \l__exsheets_questions_id_tl +\tl_new:N \l__exsheets_questions_meta_tl \tl_new:N \g__exsheets_questions_current_id_tl \tl_new:N \l__exsheets_title_tl @@ -860,18 +870,6 @@ { \bool_gset_true:N \g__exsheets_questions_use_bool } % Optionen: \IfNoValueF { #1 } { \keys_set:nn { exsheets / question } { #1 } } - % Punktevergabe: - \IfNoValueTF { #2 } - { - \__exsheets_read_points:n { 0 } - \bool_if:NT \l__exsheets_points_questions_default_bool - { - \fp_set_eq:NN - \l__exsheets_question_points_fp - \l__exsheets_points_default_fp - } - } - { \__exsheets_read_points:n { #2 } } % ID: \int_gincr:N \g__exsheets_questions_id_int \tl_if_blank:VTF \l__exsheets_questions_id_tl @@ -903,6 +901,36 @@ \tl_gset:Nx \g__exsheets_questions_current_id_tl { \tl_use:N \l__exsheets_questions_id_tl } } + % Punktevergabe: + \IfNoValueTF { #2 } + { + \__exsheets_read_points:n { 0 } + \bool_if:NT \l__exsheets_points_questions_default_bool + { + \fp_set_eq:NN + \l__exsheets_question_points_fp + \l__exsheets_points_default_fp + \exp_args:Nx \SetQuestionProperties + { points = \fp_to_tl:N \l__exsheets_points_default_fp } + } + } + { + \__exsheets_read_points:n { #2 } + \SetQuestionProperties{points=#2} + } + \tl_if_blank:VT \l__exsheets_question_heading_instance_tl + { + \tl_set_eq:NN + \l__exsheets_question_heading_instance_tl + \l__exsheets_heading_instance_tl + } + % meta: + \tl_if_blank:VF \l__exsheets_questions_meta_tl + { + \prop_gput:NVV \g__exsheets_questions_meta_prop + \g__exsheets_questions_current_id_tl + \l__exsheets_questions_meta_tl + } % Auswahl der Frage: \__exsheets_select_question:V \g__exsheets_questions_current_id_tl \bool_if:nT @@ -946,7 +974,7 @@ { \tl_set_eq:NN \l__exsheets_title_tl \l__exsheets_questions_name_tl } { \tl_set_eq:NN \l__exsheets_title_tl \l__exsheets_exsheets_name_tl } \__exsheets_use_heading:VVVnn - \l__exsheets_heading_instance_tl + \l__exsheets_question_heading_instance_tl \l__exsheets_title_tl \l__exsheets_qu_counter_interpretation_tl { \l__exsheets_question_points_fp } @@ -1092,6 +1120,8 @@ name .code:n = \tl_set:Nn \l__exsheets_exsheets_name_tl { #1 } \tl_set:Nn \l__exsheets_questions_name_tl { #1 } , + headings .tl_set:N = \l__exsheets_question_heading_instance_tl , + meta .tl_set:N = \l__exsheets_questions_meta_tl , print .bool_set:N = \l__exsheets_questions_print_bool , print .default:n = true , ID .tl_set:N = \l__exsheets_questions_id_tl , @@ -1128,6 +1158,8 @@ { \exsheets_declare_question_property:n { #1 } } \@onlypreamble\DeclareQuestionProperty +\DeclareQuestionProperty{points} + \NewDocumentCommand \SetQuestionProperties { m } { \exsheets_set_question_properties:n { #1 } } @@ -1209,6 +1241,8 @@ \NewDocumentCommand \DebugExSheets { G{true} } { \use:c { bool_set_#1:N } \l__exsheets_questions_debug_bool } +\cs_new:Npn \CurrentQuestionID { \g__exsheets_questions_current_id_tl } + % ---------------------------------------------------------------------------- % include random/selected questions from a file: \bool_new:N \l__exsheets_select_questions_bool @@ -1266,7 +1300,7 @@ \prop_length:N \g__exsheets_selected_questions_prop \c_space_tl questions. } - \par + \exsheets_par: } \bool_set_false:N \l__exsheets_questions_deactivate_bool \__exsheets_select_question_random:n { ##1 } @@ -1424,9 +1458,14 @@ \__exsheets_solutions_name:VV \l__exsheets_qu_counter_interpretation_tl \l__exsheets_solutions_name_tl - \use:n { #1 } \par - \dim_compare:nNnT { \parskip } = { 0pt } - { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + \use:n { #1 } + \cs_if_eq:NNTF \exsheets_par: \scan_stop: + { \c_space_tl } + { + \exsheets_par: + \dim_compare:nNnT { \parskip } = { 0pt } + { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + } } } \cs_generate_variant:Nn \prop_gput:Nnn { Nff,Nfx,Nfn,Nxx } @@ -1455,6 +1494,12 @@ \bool_set_true:N \l__exsheets_inside_solution_bool \IfNoValueF { #1 } { \keys_set:nn { exsheets / solution } { #1 } } } + \tl_if_blank:VT \l__exsheets_solution_heading_instance_tl + { + \tl_set_eq:NN + \l__exsheets_solution_heading_instance_tl + \l__exsheets_heading_instance_tl + } \__exsheets_solution_internal: } { \end__exsheets_solution_internal: } @@ -1465,7 +1510,7 @@ \cs_new_nopar:Npn \__exsheets_solutions_name:nn #1#2 { \__exsheets_use_heading:Vnnnn - \l__exsheets_heading_instance_tl + \l__exsheets_solution_heading_instance_tl { #2 } { #1 } { 0 } { 0 } } \cs_generate_variant:Nn \__exsheets_solutions_name:nn { VV } @@ -1574,9 +1619,14 @@ \exsheets_solutions_print_name:VV \l__exsheets_current_pattern_tl \l__exsheets_tmpa_tl - \tl_use:N \l__exsheets_tmpb_tl \par - \dim_compare:nNnT { \parskip } = { 0pt } - { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + \tl_use:N \l__exsheets_tmpb_tl + \cs_if_eq:NNTF \exsheets_par: \scan_stop: + { \c_space_tl } + { + \exsheets_par: + \dim_compare:nNnT { \parskip } = { 0pt } + { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + } } } @@ -1719,9 +1769,14 @@ \exsheets_solutions_print_name:VV \l__exsheets_current_pattern_tl \l__exsheets_tmpa_tl - \tl_use:N \l__exsheets_tmpb_tl \par - \dim_compare:nNnT { \parskip } = { 0pt } - { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + \tl_use:N \l__exsheets_tmpb_tl + \cs_if_eq:NNTF \exsheets_par: \scan_stop: + { \c_space_tl } + { + \exsheets_par: + \dim_compare:nNnT { \parskip } = { 0pt } + { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + } } } @@ -1767,9 +1822,14 @@ \exsheets_solutions_print_name:VV \l__exsheets_current_pattern_tl \l__exsheets_tmpa_tl - \tl_use:N \l__exsheets_tmpb_tl \par - \dim_compare:nNnT { \parskip } = { 0pt } - { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + \tl_use:N \l__exsheets_tmpb_tl + \cs_if_eq:NNTF \exsheets_par: \scan_stop: + { \c_space_tl } + { + \exsheets_par: + \dim_compare:nNnT { \parskip } = { 0pt } + { \exsheets_glue:N \l__exsheets_solutions_skip_below_dim } + } } } } @@ -1814,6 +1874,7 @@ \keys_define:nn { exsheets / solution } { + headings .tl_set:N = \l__exsheets_solution_heading_instance_tl , print .choice: , print / true .code:n = { @@ -2051,6 +2112,7 @@ \DeclareTranslation { Spanish } { exsheets-exercise-name } { Ejercicio } \DeclareTranslation { Catalan } { exsheets-exercise-name } { Exercir } \DeclareTranslation { Turkish } { exsheets-exercise-name } { Egzersiz } + \DeclareTranslation { Croatian } { exsheets-exercise-name } { Primjer } % translation for the question \DeclareTranslation { English } { exsheets-question-name } { Question } \DeclareTranslation { British } { exsheets-question-name } { Question } @@ -2061,6 +2123,7 @@ \DeclareTranslation { Spanish } { exsheets-question-name } { Pregunta } \DeclareTranslation { Catalan } { exsheets-question-name } { Q\"uesti\'o } \DeclareTranslation { Turkish } { exsheets-question-name } { Soru } + \DeclareTranslation { Croatian } { exsheets-question-name } { Zadatak } % translation for the solutions \DeclareTranslation { English } { exsheets-solution-name } { Solution } \DeclareTranslation { British } { exsheets-solution-name } { Solution } @@ -2071,6 +2134,7 @@ \DeclareTranslation { Spanish } { exsheets-solution-name } { Soluci\'on } \DeclareTranslation { Catalan } { exsheets-solution-name } { Soluci\'o } \DeclareTranslation { Turkish } { exsheets-solution-name } { \c C\"oz\"um } + \DeclareTranslation { Croatian } { exsheets-solution-name } { Rje\v{s}enje } % the actual translating \tl_set:Nn \l__exsheets_exsheets_name_tl { \GetTranslation { exsheets-exercise-name } } @@ -2172,7 +2236,11 @@ HISTORY: 2012/11/08 v0.4 - compatibility with KOMA-Script's `parskip' option: now no unwanted skip and no overfull hbox is produced - env {task} now supports inner environments +2012/12/02 v0.5 - added \CurrentQuestionID %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: - points/decimal-marker, points/frac (?), points/format (?,im interface) +- bug in {tasks} in {solution}: label werden nicht richtig upgedatet! +- add possibility to choose different headings instances for questions and + solutions \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.cfg b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.cfg index 3ec2ae06bf5..5d195010c8b 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.cfg +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.cfg @@ -185,6 +185,43 @@ join = { main[r,vc]number[l,vc](0pt,0pt) } } +% INLINE +\DeclareInstance { exsheets-heading } { inline } { default } + { + inline = true , + number-pre-code = \c_space_tl , + number-post-code = \c_space_tl , + join = + { + main[r,vc] title[r,vc] (0pt,0pt) ; + main[r,vc] number[l,vc] (0pt,0pt) + } + } + +% INLINE, POINTS WITH THE TITLE +\DeclareInstance { exsheets-heading } { inline-wp } { default } + { + inline = true , + number-pre-code = \c_space_tl , + number-post-code = \c_space_tl , + points-pre-code = ( , + points-post-code = ) \c_space_tl , + join = + { + main[r,vc] title[r,vc] (0pt,0pt) ; + main[r,vc] number[l,vc] (0pt,0pt) ; + main[r,vc] points[l,vc] (0pt,0pt) + } + } + +% INLINE WITH NO TITLE: +\DeclareInstance { exsheets-heading } { inline-nr } { default } + { + inline = true , + number-post-code = \c_space_tl , + join = { main[r,vc] number[l,vc] (0pt,0pt) } + } + % CENTERED: \DeclareInstance { exsheets-heading } { centered } { default } { diff --git a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def index 5e38802fe70..7c1637de0a5 100644 --- a/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def +++ b/Master/texmf-dist/tex/latex/exsheets/exsheets_headings.def @@ -42,9 +42,11 @@ \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 -% the object varaibles: +% the object variables: \bool_new:N \l__exsheets_heading_runin_bool +\bool_new:N \l__exsheets_heading_inline_bool \bool_new:N \l__exsheets_heading_indent_first_bool \bool_new:N \l__exsheets_heading_toc_reversed_bool @@ -64,6 +66,9 @@ \tl_new:N \l__exsheets_heading_number_pre_code_tl \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_points_format_tl \tl_new:N \l__exsheets_heading_points_pre_code_tl \tl_new:N \l__exsheets_heading_points_post_code_tl @@ -145,6 +150,7 @@ % the `default' template interface: \DeclareTemplateInterface { exsheets-heading } { default } { 4 } { + inline : boolean = false , runin : boolean = false , indent-first : boolean = false , toc-reversed : boolean = false , @@ -160,6 +166,8 @@ 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 = , @@ -170,6 +178,7 @@ % the `default' template code: \DeclareTemplateCode { exsheets-heading } { default } { 4 } { + 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 , @@ -185,6 +194,8 @@ 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 , @@ -193,6 +204,8 @@ } { \AssignTemplateKeys + \bool_if:NT \l__exsheets_heading_inline_bool + { \cs_set_eq:NN \exsheets_par: \scan_stop: } \bool_if:nT { \l__exsheets_questions_totoc_bool && \l__exsheets_inside_question_bool } { @@ -201,7 +214,7 @@ { \bool_if:NTF \l__exsheets_heading_toc_reversed_bool { #2 \ #1 } - { #1\ #2 } + { #1 \ #2 } } } \bool_if:nT @@ -212,14 +225,15 @@ { \bool_if:NTF \l__exsheets_heading_toc_reversed_bool { #2 \ #1 } - { #1\ #2 } + { #1 \ #2 } } } \seq_set_split:NnV \l__exsheets_heading_joined_coffins_seq { ; } \l__exsheets_heading_joined_coffins_tl \seq_set_split:NnV \l__exsheets_heading_attached_coffins_seq { ; } \l__exsheets_heading_attached_coffins_tl - \bool_if:NTF \l__exsheets_heading_runin_bool + \bool_if:nTF + { \l__exsheets_heading_runin_bool || \l__exsheets_heading_inline_bool } { \hcoffin_set:Nn \l__exsheets_heading_main_coffin { @@ -268,6 +282,17 @@ { \tl_use:N \l__exsheets_heading_title_user_format_tl #2 } \tl_use:N \l__exsheets_heading_number_post_code_tl } + \hcoffin_set:Nn \l__exsheets_heading_meta_coffin + { + \prop_get:NoNT \g__exsheets_questions_meta_prop + { \g__exsheets_questions_current_id_tl } + \l__exsheets_questions_meta_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 + } + } \hcoffin_set:Nn \l__exsheets_heading_points_coffin { \bool_if:nF { \fp_compare_p:n { #3 = 0 } && \fp_compare_p:n { #4 = 0 } } @@ -312,7 +337,8 @@ \tl_use:N \l__exsheets_heading_points_post_code_tl } } - \bool_if:NF \l__exsheets_heading_runin_bool + \bool_if:nT + { !\l__exsheets_heading_runin_bool && !\l__exsheets_heading_inline_bool } { \coffin_resize:Nnn \l__exsheets_heading_main_coffin { \linewidth } { @@ -323,19 +349,23 @@ } \__exsheets_join:N \l__exsheets_heading_joined_coffins_seq \__exsheets_attach:N \l__exsheets_heading_attached_coffins_seq - \skip_vertical:N \l__exsheets_heading_above_dim - \exsheets_needspace:n + \bool_if:NF \l__exsheets_heading_inline_bool { - \coffin_ht:N \l__exsheets_heading_main_coffin + - \coffin_dp:N \l__exsheets_heading_main_coffin + - \l__exsheets_heading_below_dim + - \baselineskip + \skip_vertical:N \l__exsheets_heading_above_dim + \exsheets_needspace:n + { + \coffin_ht:N \l__exsheets_heading_main_coffin + + \coffin_dp:N \l__exsheets_heading_main_coffin + + \l__exsheets_heading_below_dim + + \baselineskip + } + \noindent } \skip_set:Nn \parfillskip { 0pt plus 1fil } - \noindent \coffin_typeset:Nnnnn \l__exsheets_heading_main_coffin { H } { l } { 0pt }{ 0pt } - \bool_if:NF \l__exsheets_heading_runin_bool + \bool_if:nT + { !\l__exsheets_heading_runin_bool && !\l__exsheets_heading_inline_bool } { \skip_vertical:N \l__exsheets_heading_below_dim \dim_compare:nF { \parskip = 0pt } -- cgit v1.2.3