ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: numbering pages included by \copypages
Date: Fri, 25 Sep 2020 00:14:59 +0200	[thread overview]
Message-ID: <a42ad0f2-5bfa-2170-d536-d941f0afefb9@gmail.com> (raw)
In-Reply-To: <nycvar.YAK.7.78.908.2009241747000.1537316@nqv-guvaxcnq>

Aditya Mahajan schrieb am 24.09.2020 um 23:48:
> On Thu, 24 Sep 2020, Alan Bowen wrote:
> 
>> I need to include several documents in a single paginated file. Treating
>> the source file (.tex) of each document as a component file in a .prd file
>> is one way to go. But I was wondering if it might be possible to do get the
>> same result using the .pdf files of each document instead.
>>
>> \copypages is promising: it includes the. pdf files and the counter in the
>> resultant .prd file is correct. But what I still have to get is the page
>> number on all pages of the included .pdf files except the first page in
>> each.
>>
>> I looked at \startpagefigure but that would be a very cumbersome way to go
>> since there over 350 pages to include, given that it handles only one page
>> at a time.
>>
>> I hope that this makes sense.
> 
> I don't completely understand the question

I guess something like this:

\setupexternalfigures[location=default]

\starttext

...

\page

\getfiguredimensions[texit.pdf]

\noheaderandfooterlines

\dorecurse{\noffigurepages}
   {\vbox to \vsize
      {\vskip-\dimexpr\headerheight+\topspace\relax
       \hbox to \hsize
         {\hskip-\backspace
          \externalfigure[texit.pdf][page=\recurselevel]%
          \hss}%
       \vss}}

\page

...

\stoptext

>> 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

Wolfgang
___________________________________________________________________________________
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-24 22:14 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 [this message]
2020-09-25  3:53     ` Aditya Mahajan
2020-09-25 10:11       ` Hans Hagen
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=a42ad0f2-5bfa-2170-d536-d941f0afefb9@gmail.com \
    --to=wolfgang.schuster.lists@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).