Re: [NTG-context] numbering pages included by \copypages
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 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 > > ___ > ___ 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 ___
Re: [NTG-context] numbering pages included by \copypages
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 ___
Re: [NTG-context] numbering pages included by \copypages
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 ___
Re: [NTG-context] numbering pages included by \copypages
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 ___
Re: [NTG-context] numbering pages included by \copypages
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 ___
[NTG-context] numbering pages included by \copypages
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 ___ 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 ___