Changes

Jump to navigation Jump to search
\firstsectionpage and \lastsectionpage
\stoppagemakeup
</texcode>
 
= Include a section from other PDF document =
 
It is possible to include a whole section (part, chapter, section...) from another PDF document generated, using the value of its reference key, such as the one generated from the following source:
 
<texcode>
\setuppagenumbering[alternative=doublesided]
\starttext
\dorecurse{25}
{\startchapter[title={Chapter}, reference={c-\recurselevel}]
\dorecurse{\recurselevel}
{\input knuth}
\stopchapter}
\stoptext
</texcode>
 
In the document you want the section to be included, use a loop ({{cmd|dostepwiserecurse}}) from the value you get from {{cmd|firstsectionpage}} and from {{cmd|lastsectionpage}}, such as in:
 
<texcode>
\starttext
\dostepwiserecurse {\firstsectionpage[x][c-18]} {\lastsectionpage[x][c-18]} {1} {
\startTEXpage[pagestate=start]
\externalfigure[x.pdf][page=\recurselevel]
\stopTEXpage
}
\stoptext
</texcode>
 
The source PDF document (the one from which pages are included) needs also its <code>.tuc</code> file used to generate it. Which pages are related to which references are contained in this file.
= Page numbering with {{cmd|startpagefigure}} =
139

edits

Navigation menu