From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: page ranges in \markpage
Date: Wed, 18 Jul 2018 21:08:04 +0200 [thread overview]
Message-ID: <5B4F9014.7050208@gmail.com> (raw)
In-Reply-To: <ca654672-1e31-42ad-09ee-7b4237d67c19@gmx.es>
[-- Attachment #1.1: Type: text/plain, Size: 2969 bytes --]
> Pablo Rodriguez <mailto:oinos@gmx.es>
> 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 <mailto:schuster.wolfgang@gmail.com>
> 18. Juli 2018 um 19:40
>
>> Pablo Rodriguez <mailto:oinos@gmx.es>
>> 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 <mailto:oinos@gmx.es>
> 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
[-- Attachment #1.2: Type: text/html, Size: 7377 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2018-07-18 19:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 16:19 Pablo Rodriguez
2018-07-18 17:40 ` Wolfgang Schuster
2018-07-18 18:44 ` Pablo Rodriguez
2018-07-18 19:08 ` Wolfgang Schuster [this message]
2018-07-18 19:38 ` Pablo Rodriguez
2018-07-19 19:56 ` Pablo Rodriguez
2018-07-19 22:19 ` Hans Hagen
2018-07-22 11:28 ` Pablo Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B4F9014.7050208@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).