On Thu, 6 Feb 2020 16:28:04 +0100
Pablo Rodriguez
Dear list,
I have the following sample:
\starttext \input knuth \page[right] \setuplayout[page] \externalfigure[\jobname.pdf][page=1] \stoptext
My question is how to get a page from the document you‘re compiling repeated inside the same document.
I have tried to search both i-context.pdf and the wiki, but “mirror” and “repeat” seem to be bad options.
You can store each finished page in a box and access the content of the stored box afterwards. \installshipoutmethod{savepages} {\dowithnextbox {\invokepagehandler{normal}{\copy\nextbox}% \putboxincache{savedpages}{\number\realpageno}\nextbox} \hbox} \setuppaper[method=savepages] \starttext \dorecurse{8} {\expanded{\chapter{Chapter \recurselevel}} \dorecurse{\recurselevel}{\samplefile{weisman}}} \startlayout[page] \directboxfromcache{savedpages}{5} \page \directboxfromcache{savedpages}{2} \stoplayout \stoptext Wolfgang