On 1/27/2026 3:39 AM, Jeff Smith wrote:
Hi everyone!

I would like to do something a bit funky involving a double sided page layout and an outer margin.

My example below is a combination of my two recent questions. I have a two-column setup with an outer margin used for callouts on a double- sided layout. So on an odd page, that margin is on the right. On an even page, it is on the other side.

What I would like to do is that for each chapter, there's an introduction text at the beginning, in a single column, that fills the whole width of the text area _including_ the margin space, which is relevant only for the two-column sections. Additionally, I want the chapter header to be centered on that width too, instead of the "regular" text width.

Essentially, I want to ignore the margin space for the beginning of each chapter.

I've tried using frames to do that, and toy around with offsets, but I can't make it work for chapters that begin on even pages. What could be the solution?


\startsetups tweak
    \doifelserightpage {
        \hsize   {\textwidth+\outermargindistance+\outermarginwidth}
    } {
        \hsize   {\textwidth}
        \leftskip{-\innermargindistance-\innermarginwidth}
    }
\stopsetups

\startsubject
\start \setups{tweak}
    \dorecurse{1}{\input knuth\par}
\stop
\stopsubject


--
\showframe
\setuppapersize[letter][letter]

\setuplayout[topspace=0.5cm, bottomspace=0.5cm, cutspace=4cm, backspace=1cm, rightmargin=3cm, leftmargin=0cm, header=1cm, footer=0.5cm, height=middle, width=middle, margindistance=0.2cm, headerdistance=0.2cm, footerdistance=0.2cm]

\setuppagenumbering[alternative=doublesided,location={footer}]

\setuphead[chapter][page=no, align=center]

\definemixedcolumns[sectioncolumns][n=2, align=right, balance=no]

\starttext

% Chapter begins on the right
\startchapter

\startsubject
\dorecurse{1}{\input knuth\par}
\stopsubject

\startsubject
\startsectioncolumns
\dorecurse{3}{\input knuth\par}
\stopsectioncolumns
\stopsubject
\stopchapter

% Chapter begins on the left
\startchapter

\startsubject
\dorecurse{1}{\input knuth\par}
\stopsubject

\startsubject
\startsectioncolumns
\dorecurse{3}{\input knuth\par}
\stopsectioncolumns
\stopsubject

\stopchapter

\stoptext
--

JFS

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________


--

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to