# [NTG-context] Clipping multiple PDFs

Jethro Djan jthryeboah at gmail.com
Tue Aug 23 19:12:15 CEST 2022

Hello,

Thanks to Pablo and Aditya for the solutions. Sometimes it is very
difficult to find the right manuals and info for what you want to achieve
for those of us new to ConTeXt. I found the stuff on
context(context.noffigurepages) here (
https://wiki.contextgarden.net/Image_Placement) and I didn’t know the
manual you linked to existed. I have also been searching for stuff about
“low-level” stuff in ConTexT like the \doloopoverlist command.

I hope to contribute to the online wiki as I become a better user of
ConTeXt.

On Tue, Aug 23, 2022 at 3:58 PM Pablo Rodriguez via ntg-context <
ntg-context at ntg.nl> wrote:

> On 8/22/22 17:46, Jethro Djan via ntg-context wrote:
> > Thanks for the solution Pablo. It works well.
>
> Glad to read it worked for you, Jethro.
>
> > I wanted to add more pdfs (which also has many pages) and found it
> > was easier for me to reason in the lua side of things. This is what I
> > have at the moment:
>
> I think this might be what you intend:
>
>   \setuplayout[page]
>   \starttext
>   \doloopoverlist{ass1,ass2,ass3,ass4,ass5,ass6,ass7,ass8}
>     {\def\Doc{\recursestring.pdf}
>      \getfiguredimensions[\Doc]
>      \dorecurse{\noffigurepages}
>      {\externalfigure[\Doc]
>        [page=\recurselevel, width=20cm, scale=950]}}
>   \stoptext
>
> > I didn’t know how to get an array (or indexed table or whatever you
> > call it) in ConTeXt/Tex.
>
> \doloopoverlist & \recursestring are your friends here.
>
> > My problem is now with context(context.noffigurepages). Am I calling
> > it wrong? All I want to do is call \noffigurepages from the lua side.
> > Is there something I am missing?
>
> The approach is totally different: "getnofpages"
> (
> http://www.pragma-ade.com/general/manuals/luametatex.pdf#search=getnofpages
> ).
>
> BTW, your code crashed my session, CPU goes to 100% and RAM usage too. I
> wonder how your sample could be compiled fine by your system.
>
> I hope it helps,
>
> Pablo
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
>
> ___________________________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220823/00953f6b/attachment-0001.htm>


More information about the ntg-context mailing list