Peter Rolf wrote: > Hi Paul, > > Paul Jones wrote: > >> Hello, >> >> I have used Latex in the past and have the following code that inserts >> information on certain pages using afterpage. Is there some way to do a >> similar thing in context? >> >> > > \setupoutput[pdf] > \definelayer[info] > > \setuplayer[info] > [height=\paperheight,width=\paperwidth] > > \setupbackgrounds[page] > [background={text,info}]% info layer is above normal text layer > > \def\WhichPage#1{% > \def\docommand##1{\ifnum\pageno=##1\relax > \setlayerframed[info][x=20mm,y=\dimexpr\paperheight-15mm,location=r] > [background=color,backgroundcolor=white] > {\tfb This page is inserted on page \number\pageno}\fi}% > \rawprocesscommalist[#1]\docommand}% > ...
lemme show you a few tricks: (1) test for a number in a set (use \expanded{\doifinset....} if in doubt) (2) use the rightbottom as preset \def\WhichPage#1% {\doifinset{\realfolio}{#1} {\setlayerframed [info] [preset=rightbottom,x=20mm,y=15mm] [background=color,backgroundcolor=white] {\tfb This page is inserted on page \realfolio}% }} \def\WhichPage#1% {\doifinset{\realfolio}{#1} {\setlayerframed [info] [preset=rightbottom,x=20mm,y=15mm] [background=color,backgroundcolor=white] {\tfb This page is inserted on page \realfolio}% }} or cleaner (no macro and args involved): \startsetups [at some pages] \setlayerframed [info] [preset=rightbottom,x=20mm,y=15mm] [background=color,backgroundcolor=white] {\tfb This page is inserted on page \realfolio} \stopsetups \setupheadertexts[\doifinset{\realfolio}{3,4}{\directsetup{at some pages}}] now, this inserts *as overlay* however if one wants to insert something after a specific page, there is % \startpostponing [pagenumber] [+pageoffset] % % \startpostponing[2] % PAGE 2 \blank % \stoppostponing % % \startpostponing[+1] % PAGE +1 \blank % \stoppostponing % % \startpostponing[+2] % PAGE +2 \blank % \stoppostponing % % \starttext \dorecurse{4}{\input tufte \page} \stoptext Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context