Changes

Jump to navigation Jump to search
1,238 bytes added ,  17:29, 30 January 2021
no edit summary
\stoptext
</context></cd:example><cd:example title="Modifying the page before a chapter">Here is an example which shows how you can change the background colorof an empty page before the chapter title. <context mode="mkiv" source="yes" text="produces">% next five lines just to show the effect on this wiki\setuppapersize[A8][A5,landscape]\setuppaper[nx=4, ny=2]\setuplayout[page][location=middle, marking=on]\setuparranging [XY]\setupbodyfont[6pt] % actual example starts here\setuppagenumbering [alternative=doublesided] \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=gray] \page[right] \popbackground}\stopsetups \setuphead [chapter] [page=yes, before=\directsetup{chapter:before}] \starttext \startchapter[title={Knuth}]\dorecurse{2}{\samplefile{knuth}}\stopchapter \startchapter[title={Ward}]\dorecurse{1}{\samplefile{ward}}\stopchapter \startchapter[title={Zapf}]\dorecurse{2}{\samplefile{zapf}}\stopchapter  \stoptext</context> The command \pushbackground stores the values of the background which is modified. After the execution of \page[right] the old values of background are restored by \popbackground.</cd:example></cd:examples>
<cd:notes></cd:notes>
<cd:seealso>

Navigation menu