2

Trying to wrap my head around section rendering.

The following

\defineheadalternative
  [fullpage]
  [
    alternative=somewhere,
    renderingsetup=headrenderings:fullpage,
  ]

\startsetups[headrenderings:fullpage]
  \startTEXpage % should be enough
    \headtextcontent
  \stopTEXpage
  \page[yes] % stressing the point
\stopsetups

\setuphead
  [section]
  [
    alternative=fullpage,
  ]

\starttext

\chapter{One page one}

\section{This should be on page two}

% should start on the third page
\input knuth

\stoptext

produces:

enter image description here

I would expect \startTEXpage or similar to have a page break both before and after it. Or at least \page[yes] to push the content to the next page.

Maybe rendering is wrapped in some box? Or is it a constraint of setups? Thanks for any pointer.


Edit: to clarify, I'm looking for the spot ConTeXt is introducing this wrapper box.

This is the area in the source I've been exploring:

https://source.contextgarden.net/tex/context/base/mkxl/strc-sec.mkxl?search=strc_sectioning_handle#l877

I'm new to TeX so don't grasp its internals.

4
  • 1
    You are inside a box, so you will not get a new page. \startTEXpage and \stopTEXpage are not meant to be used like this. Maybe in the \setuphead add after={\page[yes]}. It is a bit unclear what you want to do..
    – mickep
    Oct 3, 2022 at 13:35
  • 2
    A save way to to put section titles on a separate page is the use of a makeup-environment, e.g. \setuphead[section][before={\starttextmakeup[pagestate=start]},after={\stoptextmakeup}]. Oct 3, 2022 at 14:02
  • Thank you! I just want to make sense how it works. :) Looked at the source but unclear where this 'box' comes online: source.contextgarden.net/tex/context/base/mkxl/… (sorry, new to TeX).
    – pestaa
    Oct 3, 2022 at 15:05
  • 2
    The code for the section layout resides in strc-ren.mkxl. Oct 3, 2022 at 15:42

1 Answer 1

3

The box is defined as b_strc_rendering_head and is populated @

https://source.contextgarden.net/tex/context/base/mkxl/strc-ren.mkxl#l118

So there's no way to break out of the box even with \defineheadalternative[...][alternative=somewhere].

This also sheds light onto ConTeXt LMTX: Offset on page titles with MetaPost

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .