From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108857 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: numbering pages included by \copypages Date: Mon, 28 Sep 2020 18:00:40 -0400 Message-ID: References: <69cf7814-800c-457c-9ca6-6791b134b8be@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0414257660903332212==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38322"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 29 00:01:16 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kN1Ct-0009tJ-NK for gctc-ntg-context-518@m.gmane-mx.org; Tue, 29 Sep 2020 00:01:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 00D741A9206; Tue, 29 Sep 2020 00:00:56 +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 zrg6NMeVeCih; Tue, 29 Sep 2020 00:00:54 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2BD351A91F8; Tue, 29 Sep 2020 00:00:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2EBA31A8CF8 for ; Tue, 29 Sep 2020 00:00:53 +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 SdsmBRvu2AW5 for ; Tue, 29 Sep 2020 00:00:52 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.54; helo=mail-ed1-f54.google.com; envelope-from=bowenalan03@gmail.com; receiver= Original-Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 2A6961A8A49 for ; Tue, 29 Sep 2020 00:00:52 +0200 (CEST) Original-Received: by mail-ed1-f54.google.com with SMTP id g4so3904624edk.0 for ; Mon, 28 Sep 2020 15:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=u12ZR8uO3+tRNA6sPP+GcabGF7NDPZjUYqUiQeCJ1tc=; b=GSRB8memHsTRxCI4T78zXMvbqoE35SA6LbJDD+YjZq+j/GokeGeu5JPi7f+QPjGKkz PhSPAPpoxylvOg8C1xCMNKQ1jtgVxOcDTUOY1inSTt4suJZDTgfLGFH4ie+fGGdpIXiU xnyJ+obychsGKaJstTKwD9/7VSTrSx/swgCUZSiaMxZdlGr6UA5+uwmodISGoA4/AVXt Wf80MSRwOHtTVXy4ThFLiYWq7DZ4wJx7OLlXqYhTCHmQg7FLzK4VNa5uTgkst6BXnpVr 8H1cG5MITYIokvrMR/XkveRW3PCUFbVuC1eLnHXW2M62LYWzcnCHP0Yy4ZOGdt63tWgt L9ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=u12ZR8uO3+tRNA6sPP+GcabGF7NDPZjUYqUiQeCJ1tc=; b=IPAG4h5RMCc8URm67GMl+ragZSW+rWF1X/8L3XzhSxdEd61Qk6k5DTPw5b6Xk8QJyw zCEmUW3Xwvte8DIAdQI3Zfbl1Z+PlgjuR5pXZLjpTdVSmVfWruelMP+pG2Hlcrhaa1vc 3TzOcSQHvsz9nNMnFZoADMwSBCaqXZcGXNMFz81bV1NB6FeW3rm1K5ruURHWP+ZXz6Xo 8MJ/BnwSplcKvKYuRKUJbMU22IqDG2XBwQVdoTdVx+BARtyEYkVIpPlx3wYeFYiRzglO Weq4X8ROoq+bd11IavSQA1UwFHJNaUg10MWYcktwWMsVzPqafTTSTcwtEGSZ5vFN4Jr2 fnXw== X-Gm-Message-State: AOAM5339Oa0JtZUWVsoAh/SWt0Ni+zsj/IAh88cBKDMxEmnZUDkoIz+R x0DG0x9/XEcCNrhERT3qvJ1tdWkSyuJGkHrLxRVucFcTjfQ= X-Google-Smtp-Source: ABdhPJxShYGVSH2rQU8qFHatm4GAXcEsc45+1ANcaRhKi/66VDHCeX6gZgqvz7oFy9fDvafH73E1KG0XYiLdl2Zzxn0= X-Received: by 2002:a05:6402:1805:: with SMTP id g5mr64039edy.135.1601330451712; Mon, 28 Sep 2020 15:00:51 -0700 (PDT) In-Reply-To: <69cf7814-800c-457c-9ca6-6791b134b8be@xs4all.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:108857 Archived-At: --===============0414257660903332212== Content-Type: multipart/alternative; boundary="000000000000be10bf05b066cce5" --000000000000be10bf05b066cce5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable After further testing guided by Hans=E2=80=99 suggestion, I now have \setupexternalfigures[location=3Ddefault] \setuplayer[preset=3Drightbottom, method=3Doverlay]{} \setuppagenumbering[color=3Ddarkmagenta] \starttext \getfiguredimensions[HannahBW.pdf] \dorecurse{\noffigurepages}{ \startTEXpage[pagestate=3Dstart] \layeredtext[] [boffset=3D3pc, roffset=3D3pc] {\darkmagenta\subpagenumber} {\externalfigure[HannahBW.pdf][page=3D#1]} \stopTEXpage } \stoptext which works, though it would arguably be better if there is a way to prevent the subpage number on the first page of every included file. Alan On Fri, Sep 25, 2020 at 6:12 AM Hans Hagen wrote: > On 9/25/2020 5:53 AM, Aditya Mahajan wrote: > > On Fri, 25 Sep 2020, Wolfgang Schuster wrote: > > > >> Aditya Mahajan schrieb am 24.09.2020 um 23:48: > >>> On Thu, 24 Sep 2020, Alan Bowen wrote: > >>>> Any suggestions or pointers will be most welcome. > >>> > >>> See if this gives you any ideas .... > >>> > >>> https://adityam.github.io/context-blog/post/include-multi-page-pdf/ > >> > >> When both document have the same size you can replace TeXpage with a > "page" > >> layout. > >> > >> \startlayout[page] > >> \dorecurse{\noffigurepages}{\externalfigure[...][page=3D\recurselevel]= } > >> \stoplayout > > > > Thanks for the comment (also I didn't know about \startlayout .. > \stoplayout). Unfortunately, in my use case, the paper sizes may not be t= he > same.. I am typically attaching published journal articles and some are > published on letter paper and some on A4. > > \setupexternalfigures[location=3Ddefault] > > \starttext > > \dorecurse {5} {Before #1\page} > > \getfiguredimensions[oeps.pdf] > > \startsetups SomeNumber > \vbox to \overlayheight \bgroup > \vss > \hbox to \overlaywidth \bgroup > \hss > \bfd \red You can figure it out: \pagenumber > \hss > \egroup > \vss > \egroup > \stopsetups > > \defineoverlay[SomeNumber][\setups{SomeNumber}] > > \dorecurse {\noffigurepages} { > \startTEXpage[pagestate=3Dstart] > \externalfigure[oeps.pdf][page=3D#1,background=3DSomeNumber]% > \stopTEXpage > } > > \dorecurse {5} {After #1\page} > > \stoptext > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > --000000000000be10bf05b066cce5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After furthe= r=C2=A0testing guided by Hans=E2=80=99 suggestion, I now have

\setupext= ernalfigures[location=3Ddefault]
<= font face=3D"trebuchet ms, sans-serif">\setuplayer[preset=3Drightbottom, me= thod=3Doverlay]{}
\setuppagenumbering[color=3Ddarkmagenta]
\sta= rttext
\getfiguredimensions[HannahBW.pdf]

\dorecurse= {\noffigurepages}{
\startTEXpage[pagestate=3Dstart]
\layeredtext[]<= /font>
[boffset=3D3pc, roffset=3D3pc]
{\darkmagenta\subpagenumber}
=
{\external= figure[HannahBW.pdf][page=3D#1]}
<= font face=3D"trebuchet ms, sans-serif">\stopTEXpage
}
\stoptex= t

which works, though it would arguably be better if t= here=C2=A0is a way to prevent the subpage number on the first page of every= included file.

Alan

On Fri, Sep 25, 2020 at 6:12 AM Hans Hag= en <j.hagen@xs4all.nl> wrote= :
On 9/25/2020 5:53 AM, Aditya Mahajan wrote:
> On Fri, 25 Sep 2020, Wolfgang Schuster wrote:
>
>> Aditya Mahajan schrieb am 24.09.2020 um 23:48:
>>> On Thu, 24 Sep 2020, Alan Bowen wrote:
>>>> Any suggestions or pointers will be most welcome.
>>>
>>> See if this gives you any ideas ....
>>>
>>> https://adityam.gith= ub.io/context-blog/post/include-multi-page-pdf/
>>
>> When both document have the same size you can replace TeXpage with= a "page"
>> layout.
>>
>> \startlayout[page]
>> \dorecurse{\noffigurepages}{\externalfigure[...][page=3D\recursele= vel]}
>> \stoplayout
>
> Thanks for the comment (also I didn't know about \startlayout .. \= stoplayout). Unfortunately, in my use case, the paper sizes may not be the = same.. I am typically attaching published journal articles and some are pub= lished on letter paper and some on A4.

\setupexternalfigures[location=3Ddefault]

\starttext

\dorecurse {5} {Before #1\page}

\getfiguredimensions[oeps.pdf]

\startsetups SomeNumber
=C2=A0 =C2=A0 =C2=A0\vbox to \overlayheight \bgroup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\vss
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\hbox to \overlaywidth \bgroup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\hss
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\bfd \red You= can figure it out: \pagenumber
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\hss
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\egroup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\vss
=C2=A0 =C2=A0 =C2=A0\egroup
\stopsetups

\defineoverlay[SomeNumber][\setups{SomeNumber}]

\dorecurse {\noffigurepages} {
=C2=A0 =C2=A0 =C2=A0\startTEXpage[pagestate=3Dstart]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\externalfigure[oeps.pdf][page=3D#1,backg= round=3DSomeNumber]%
=C2=A0 =C2=A0 =C2=A0\stopTEXpage
}

\dorecurse {5} {After #1\page}

\stoptext

-----------------------------------------------------------------
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Hans Hagen | PRAGMA ADE
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Ridderstraat 27 | 80= 61 GH Hasselt | The Netherlands
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tel: 038 477 53 69 | www.pragma-ade.nl | www.= pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--000000000000be10bf05b066cce5-- --===============0414257660903332212== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============0414257660903332212==--