From 12fd8a1b4fa2a1cec2c363284f9baa572dbc96b9 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 2 Jul 2020 17:28:32 +0200 Subject: 2020-07-02 16:06:00 --- tex/context/base/mkiv/strc-sec.mkiv | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tex/context/base/mkiv/strc-sec.mkiv') diff --git a/tex/context/base/mkiv/strc-sec.mkiv b/tex/context/base/mkiv/strc-sec.mkiv index a1f02b740..4959ffc16 100644 --- a/tex/context/base/mkiv/strc-sec.mkiv +++ b/tex/context/base/mkiv/strc-sec.mkiv @@ -145,6 +145,7 @@ \xdef\currentstructureshownumber {\structureparameter\c!number}% \xdef\currentstructuresaveinlist {\structureparameter\c!saveinlist}% \xdef\currentstructureincrementnumber{\structureparameter\c!incrementnumber}% + \xdef\currentstructureplaceholder {\structureparameter\c!placeholder}% \ifx\currentstructureexpansion\s!xml \xmlstartraw \xdef\currentstructuretitle {\structureparameter\c!title}% @@ -997,12 +998,26 @@ \setfalse\c_strc_sectioning_ignore_page % ignorespaces prevents spaces creeping in when after=\dontleavehmode \dostarttagged\t!sectioncontent\empty - \ifconditional\headisdisplay - \expandafter\ignorespaces + \ifx\currentstructureplaceholder\empty + \ifconditional\headisdisplay + \doubleexpandafter\ignorespaces + \else + \doubleexpandafter\ignorepars + \fi \else - \expandafter\ignorepars + \expandafter\strc_sectioning_placeholder \fi} +%D \starttyping +%D \startsubject[placeholder=todo,title=one] +%D whatever one +%D \stopsubject +%D \stoptyping + +\def\strc_sectioning_placeholder + {\placeholder[\currentstructureplaceholder]% + \gobblenested{\e!start\currenthead}{\e!stop\currenthead}{\e!stop\currenthead}} + % typesetting (the getters are public) \unexpanded\def\strc_rendering_place_head_number_and_text -- cgit v1.2.3