From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101270 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: page ranges in \markpage Date: Wed, 18 Jul 2018 21:08:04 +0200 Message-ID: <5B4F9014.7050208@gmail.com> References: <5B4F7B79.8050908@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3351995010202428762==" X-Trace: blaine.gmane.org 1531940800 28101 195.159.176.226 (18 Jul 2018 19:06:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 19:06:40 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 18 21:06:36 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffrmV-0007FJ-RQ for gctc-ntg-context-518@m.gmane.org; Wed, 18 Jul 2018 21:06:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 98A014494D; Wed, 18 Jul 2018 21:08:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ay2_y8kz4_Mp; Wed, 18 Jul 2018 21:08:19 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id ECC8944943; Wed, 18 Jul 2018 21:08:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 05F0744943 for ; Wed, 18 Jul 2018 21:08:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4fjSu6_nHBMk for ; Wed, 18 Jul 2018 21:08:18 +0200 (CEST) Original-Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 83ABB44942 for ; Wed, 18 Jul 2018 21:08:08 +0200 (CEST) Original-Received: by mail-ed1-f43.google.com with SMTP id s16-v6so5131417edq.12 for ; Wed, 18 Jul 2018 12:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=oEJNxRqCghKWBXMrBCZqjzyH74XhwnJe/QKURkwNo28=; b=Ln2WKpvhrG7mCxA1mIjoMFdNahypvsXc1E/1hQj22Hd4WEe9lme+ZyxsFTkNVKGsy5 9+bZf3Bibx6uiVjCAK31yZqpNizaeAVWf0fdFa6Wm0uUSXHeCuF9rqmH5uPqji+qJwy5 umccol7dPfNeNIk94ckvzhCa8gDMo7Mhkk+vMOT5p8Hik1G5hMmhz6cdrpxfdqH+v6tq wh+ttsfpYNn0yBNrEW6A4HjGsoOiXz0Aon6IuzCbICc3/Yv9rWJjS6yGUQuEnhQu51yu L7R3c2LDRf/R8c2OS0MXgXi9ik5Pz4GPqWw4pnVCvLGO4tsmKFh2uzsC7+VhsyMeoVxd knIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=oEJNxRqCghKWBXMrBCZqjzyH74XhwnJe/QKURkwNo28=; b=uVDM1Oj2knjL20/BHePJduiX0fVltijUGqAtSB1EPR7Ivtt64spMUcuaxOAtdVRj++ RzwStX60P54dscEOXn9BNLRuXbaX9gr8FWXnSJMasr0FhEeTpb18mYZIj/CGKni8ZYo3 ghrQBGa98XxgBgznPbhbgCf9sFDAdnQ+zFTaVVlKz26Qj5AcE9maAV3MJhTyLxO6Jr4l Mm6GOcK8fW2n6QWywaoySdbpP8mIZ53Tqm3H1oq93kT07eivtDXLGbWInTKb52GiyzJW nEVTUT+hBa1bQrdqZ6vGlU3X8KTBhKS31vBjM12Ydlrd70/psdmjNz+CPDnVSqjmDucC cpFQ== X-Gm-Message-State: AOUpUlFVVenveyDHaS5cKjmfFwIYo3GftKox9/iAInR8ztqITBv624AF A0BtuyiIyQ8JKRNggEhig4avpgnD X-Google-Smtp-Source: AAOMgpe9fJqYbauWWbklElVM5mhOZrBAJ+XQfOZfAFCdjCStiJj41kWIWG6JcEjhPLuN2RfriOnwLQ== X-Received: by 2002:a50:9493:: with SMTP id s19-v6mr8322670eda.285.1531940887943; Wed, 18 Jul 2018 12:08:07 -0700 (PDT) Original-Received: from [192.168.1.4] (x4dbdef2e.dyn.telefonica.de. [77.189.239.46]) by smtp.gmail.com with ESMTPSA id c20-v6sm1568426edr.14.2018.07.18.12.08.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 12:08:07 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:101270 Archived-At: This is a multi-part message in MIME format. --===============3351995010202428762== Content-Type: multipart/alternative; boundary="------------000409000307010200030104" This is a multi-part message in MIME format. --------------000409000307010200030104 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > 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 > >> 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] > >> \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 --------------000409000307010200030104 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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
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
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
--------------000409000307010200030104-- --===============3351995010202428762== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============3351995010202428762==--