* numbering pages included by \copypages
@ 2020-09-24 19:12 Alan Bowen
2020-09-24 21:48 ` Aditya Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: Alan Bowen @ 2020-09-24 19:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 760 bytes --]
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.
Any suggestions or pointers will be most welcome.
Alan
[-- Attachment #1.2: Type: text/html, Size: 1642 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: numbering pages included by \copypages
2020-09-24 19:12 numbering pages included by \copypages Alan Bowen
@ 2020-09-24 21:48 ` Aditya Mahajan
2020-09-24 22:14 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2020-09-24 21:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
> 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/
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: numbering pages included by \copypages
2020-09-24 21:48 ` Aditya Mahajan
@ 2020-09-24 22:14 ` Wolfgang Schuster
2020-09-25 3:53 ` Aditya Mahajan
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2020-09-24 22:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: numbering pages included by \copypages
2020-09-24 22:14 ` Wolfgang Schuster
@ 2020-09-25 3:53 ` Aditya Mahajan
2020-09-25 10:11 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan @ 2020-09-25 3:53 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
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.
Thanks,
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: numbering pages included by \copypages
2020-09-25 3:53 ` Aditya Mahajan
@ 2020-09-25 10:11 ` Hans Hagen
2020-09-28 22:00 ` Alan Bowen
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2020-09-25 10:11 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan, Wolfgang Schuster
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: numbering pages included by \copypages
2020-09-25 10:11 ` Hans Hagen
@ 2020-09-28 22:00 ` Alan Bowen
0 siblings, 0 replies; 6+ messages in thread
From: Alan Bowen @ 2020-09-28 22:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3180 bytes --]
After further testing guided by Hans’ suggestion, I now have
\setupexternalfigures[location=default]
\setuplayer[preset=rightbottom, method=overlay]{}
\setuppagenumbering[color=darkmagenta]
\starttext
\getfiguredimensions[HannahBW.pdf]
\dorecurse{\noffigurepages}{
\startTEXpage[pagestate=start]
\layeredtext[]
[boffset=3pc, roffset=3pc]
{\darkmagenta\subpagenumber}
{\externalfigure[HannahBW.pdf][page=#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 <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.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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 6547 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-28 22:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 19:12 numbering pages included by \copypages 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
2020-09-28 22:00 ` Alan Bowen
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).