ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: Jethro Djan via ntg-context <ntg-context@ntg.nl>
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: Re: Clipping multiple PDFs
Date: Tue, 23 Aug 2022 17:57:49 +0200	[thread overview]
Message-ID: <0bc8c642-10b7-2052-a49e-626063ef4d43@gmx.es> (raw)
In-Reply-To: <CAHgnkf9PAvDJ6AqnrU6Up_PR+QFPZ-GRtcSja3b3YfnBvsu=WQ@mail.gmail.com>

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

  reply	other threads:[~2022-08-23 15:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18  0:13 jethro Reuel via ntg-context
2022-08-21 16:41 ` Pablo Rodriguez via ntg-context
2022-08-22 15:46   ` Jethro Djan via ntg-context
2022-08-23 15:57     ` Pablo Rodriguez via ntg-context [this message]
2022-08-23 17:12       ` Jethro Djan via ntg-context
2022-08-23 17:50         ` Pablo Rodriguez via ntg-context
2022-08-22 15:43 Jethro Djan via ntg-context
2022-08-23 15:27 ` Aditya Mahajan via ntg-context
2022-08-23 17:38   ` Pablo Rodriguez via ntg-context
2022-08-23 17:47     ` Aditya Mahajan via ntg-context
2022-08-22 15:44 Jethro Djan via ntg-context

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=0bc8c642-10b7-2052-a49e-626063ef4d43@gmx.es \
    --to=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /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).