diff options
Diffstat (limited to 'tex/context/base/core-sec.tex')
-rw-r--r-- | tex/context/base/core-sec.tex | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex index b92fbb21c..79ee538d7 100644 --- a/tex/context/base/core-sec.tex +++ b/tex/context/base/core-sec.tex @@ -1196,22 +1196,32 @@ \dosomebreak{\penalty\!!counta}% \egroup} +\newconditional\ignorehandlepagebreak + \def\handlepagebreak#1% - {\dohandlepagebreakAA{#1}% - \ifnum\countervalue{\??se\previoussection\@@sectie}>\zerocount\relax - \ifnum\countervalue{\??se\@@sectie}>\zerocount - \dohandlepagebreakB{#1}% + {\ifconditional\ignorehandlepagebreak + \setfalse\ignorehandlepagebreak + \else + \dohandlepagebreakAA{#1}% + \ifnum\countervalue{\??se\previoussection\@@sectie}>\zerocount\relax + \ifnum\countervalue{\??se\@@sectie}>\zerocount + \dohandlepagebreakB{#1}% + \else + \doifnotvalue{\??ko#1\c!continue}\v!yes{\dohandlepagebreakB{#1}}% + \fi \else - \doifnotvalue{\??ko#1\c!continue}\v!yes{\dohandlepagebreakB{#1}}% + \dohandlepagebreakB{#1}% \fi - \else - \dohandlepagebreakB{#1}% - \fi - \dohandlepagebreakAB{#1}} + \dohandlepagebreakAB{#1}% + \fi} -\def\handlepagebreakC#1% - {\xdef\@@kolevel{\getvalue{\??se\@@sectie\c!level}}% - \nobreak} +\def\handlenopagebreak#1% + {\ifconditional\ignorehandlepagebreak + \setfalse\ignorehandlepagebreak + \else + \xdef\@@kolevel{\getvalue{\??se\@@sectie\c!level}}% + \nobreak + \fi} \def\localheadheight {\strutht} \def\localheaddepth {\strutdp} @@ -1419,6 +1429,8 @@ % todo: write to list etc in both args or in enclosing h/vbox else it gets % lost when no #1 or #2 is typeset +% we will use variables here + \def\dodododoconstructhead#1[#2]#3#4% [ref] {number} {title} {\def\currenthead{#1}% dus #1 overal vervangen \let\finalsectionnumber\dofinalsectionnumber % overloaded ungrouped -) @@ -1641,6 +1653,7 @@ \fi \flushingcolumnfloatstrue \someheadconversionfalse + \setfalse\ignorehandlepagebreak \let\fullsectionnumber\limitedfullsectionnumber % ignorespaces prevents spaces creeping in when after=\dontleavehmode \ifdisplaysectionhead\ignorespaces\else\expandafter\GotoPar\fi} @@ -2052,7 +2065,7 @@ {\ifhmode \scratchcounter=\lastpenalty\unpenalty % no beauty in this \ifdim\lastskip=\headsignal - \handlepagebreakC{#1}% + \handlenopagebreak{#1}% \global\settrue\continuoussectionhead \else \penalty\scratchcounter |