ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Aditya Mahajan <adityam@umich.edu>,
	Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: numbering pages included by \copypages
Date: Fri, 25 Sep 2020 12:11:14 +0200	[thread overview]
Message-ID: <69cf7814-800c-457c-9ca6-6791b134b8be@xs4all.nl> (raw)
In-Reply-To: <nycvar.YAK.7.78.908.2009242351320.1870506@nqv-guvaxcnq>

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=\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 the same.. I am typically attaching published journal articles and some are published on letter paper and some on A4.

\setupexternalfigures[location=default]

\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=start]
         \externalfigure[oeps.pdf][page=#1,background=SomeNumber]%
     \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
___________________________________________________________________________________

  reply	other threads:[~2020-09-25 10:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 19:12 Alan Bowen
2020-09-24 21:48 ` Aditya Mahajan
2020-09-24 22:14   ` Wolfgang Schuster
2020-09-25  3:53     ` Aditya Mahajan
2020-09-25 10:11       ` Hans Hagen [this message]
2020-09-28 22:00         ` Alan Bowen

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=69cf7814-800c-457c-9ca6-6791b134b8be@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /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).