diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv index 89aa6f55a1a..01464ad8649 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-ren.mkiv @@ -120,7 +120,7 @@ \setheadmarking \doresetstructureheadnumbercontent \ifconditional\c_strc_sectioning_empty - \setbox\b_strc_rendering_head\hbox \headreferenceattributes to \zeropoint{\strut}% + \setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}% \else \docheckheadreference \setbox\b_strc_rendering_head\hbox \headreferenceattributes @@ -139,7 +139,7 @@ \dosetstructureheadnumbercontent \doresetstructureheadnumbercontent \ifconditional\c_strc_sectioning_empty - \setbox\b_strc_rendering_head\hbox \headreferenceattributes to \zeropoint{\strut}% + \setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}% \else % = needed \docheckheadreference \setbox\b_strc_rendering_head\hbox \headreferenceattributes @@ -151,7 +151,7 @@ \strc_rendering_stop_placement} \unexpanded\def\strc_rendering_place_head_empty - {\hbox\headreferenceattributes{\getheadsyncs}} % \hpack ? + {\hpack\headreferenceattributes{\getheadsyncs}} %D \starttyping %D \def\StretchedBox#1% @@ -197,14 +197,13 @@ \def\strc_rendering_start_placement {\bgroup \setsystemmode\currenthead - % \strc_rendering_initialize_alternatives \strc_rendering_initialize_dimensions - % \strc_rendering_initialize_line_state \reseteverypar % needed indeed \noindent % ipv \whitespace elders, na \forgetall ! \bgroup + \synctexpushline \edef\p_aligntitle{\headparameter\c!aligntitle}% \ifx\p_aligntitle\v!yes \strc_rendering_initialize_hsize_local @@ -325,7 +324,9 @@ % kind of special, we want to snap heads also according to local specs local \setbox\b_strc_rendering_head\hbox {\hskip\dimexpr\d_strc_rendering_local_leftoffset+\headparameter\c!margin\relax - \box\b_strc_rendering_head}% + \box\b_strc_rendering_head + \getheadsyncs % a latelua why not in the box + }% \ifgridsnapping \applygridmethod {\headparameter\c!grid}% @@ -345,14 +346,14 @@ \nointerlineskip \dosomebreak\nobreak \fi - \getheadsyncs +% \getheadsyncs % a latelua why not in the box \else % somehow this goes ok even when we push in the margin probably because we gobble pars % in the process of collecting index entries etc \strut \flushnotes % new, here since we're in par mode \unhbox\b_strc_rendering_head - \getheadsyncs + \getheadsyncs % a latelua \ifconditional\headissomewhere \strc_sectioning_stay_on_this_line % test case: alternative=margintext and \startparagraph .. \else @@ -370,6 +371,7 @@ \fi \fi \fi + \synctexpopline \egroup \egroup \ifconditional\headisdisplay @@ -528,8 +530,14 @@ \def\fakedheadnumber{\vphantom{0}} % needed for mathplus +% \unexpanded\def\fakeheadnumbercontent +% {\hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}} + \unexpanded\def\fakeheadnumbercontent - {\hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}} + {\edef\p_hidenumber{\headparameter\c!hidenumber}% + \ifx\p_hidenumber\v!yes\else + \hbox to \zeropoint{\let\getheadnumber\fakedheadnumber\headnumbercontent}% + \fi} \unexpanded\def\strc_rendering_inject_number_and_text {\edef\p_command{\headparameter\c!command}% assumes \unexpanded definition @@ -777,18 +785,18 @@ \startsetups[\??headrenderings:\v!bottom] \ifconditional\headshownumber - \setbox0\hbox { + \setbox\scratchboxone\hbox { \headnumbercontent } - \setbox2\vbox { + \setbox\scratchboxtwo\vbox { \headsetupspacing - \advance\hsize-\wd0\relax + \advance\hsize-\wd\scratchboxone\relax \headtextcontent } \hbox { - \box0 + \box\scratchboxone \hskip\headnumberdistance - \box2 + \box\scratchboxtwo } \else \vbox { @@ -806,18 +814,18 @@ \startsetups[\??headrenderings:\v!top] \ifconditional\headshownumber - \setbox0\hbox { + \setbox\scratchboxone\hbox { \headnumbercontent } - \setbox2\vtop { + \setbox\scratchboxtwo\vtop { \headsetupspacing - \advance\hsize-\wd0\relax + \advance\hsize-\wd\scratchboxone\relax \headtextcontent } \hbox { - \box0 + \box\scratchboxone \hskip\headnumberdistance - \box2 + \box\scratchboxtwo } \else \vtop{ |