Pablo Rodriguez
18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]
\setupinteraction[state=start]
\setupinteractionscreen[option={portrait, paper}, print=pages]
\markpage[pages][100-300]
\starttext
\insertpages[i-context.pdf][width=0pt]
\stoptext

Many thanks for your help,

Pablo
Wolfgang Schuster
18. Juli 2018 um 19:40

18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]

\setuplayout[page]

\setupinteraction[state=start]
\setupinteractionscreen[option={portrait, paper}, print=pages]
\markpage[pages][100-300]
\starttext
\insertpages[i-context.pdf][width=0pt]
\stoptext

\startmarkpages[page]
...
\stopmarkpages


Wolfgang
Pablo Rodriguez
18. Juli 2018 um 20:44
On 07/18/2018 07:40 PM, Wolfgang Schuster wrote:
Pablo Rodriguez 18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]
\setuplayout[page]

Many thanks for your reply, Wolfgang.

I didn’t know the already defined layout. In which source file is it
defined? (I would like to know whether there are more already defined
layouts.)

page-lay.mkiv

\insertpages[i-context.pdf][width=0pt]
[...]
\startmarkpages[page]
...
\stopmarkpages

Sorry, but how do I apply that with to imposed pages with \insertpages?

I know that \filterpages is there, but I need to have the complete
document to print only some of the pages.

You can get the number of pages of the included file with \getfiguredimensions.

Afterwards you can use a loop where you add the markpage commands at
the begin and end of the range, below is a simple example but it’s easy to write
a better loop with Lua.


\setuplayout[page]

\setupinteraction[state=start]

\setupinteractionscreen[option={portrait, paper}, print=pages]

\starttext

\getfiguredimensions[i-context.pdf]

\dostepwiserecurse{1}{99}{1}{\externalfigure[i-context.pdf][height=\textheight,page=\recurselevel]}
\startmarkpages[page]
\dostepwiserecurse{100}{300}{1}{\externalfigure[i-context.pdf][height=\textheight,page=\recurselevel]}
\stopmarkpages
\dostepwiserecurse{301}{\noffigurepages}{1}{\externalfigure[i-context.pdf][height=\textheight,page=\recurselevel]}

\stoptext


Wolfgang