ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: Re: How to display the pages of a particular section in another PDF?
Date: Mon, 5 Dec 2022 18:30:08 +0100	[thread overview]
Message-ID: <21ac1c97-97be-9ad6-f8f0-d733c41cbfe4@freedom.nl> (raw)
In-Reply-To: <4cb2cc84-1328-d081-8273-57fafce4b8af@gmx.es>

On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:
> On 12/5/22 13:13, Hans Hagen via ntg-context wrote:
>> On 12/4/2022 11:30 PM, Joel via ntg-context wrote:
>>> I can use this code to display page 5 from a PDF:
>>> [...]
>>> \externalfigure[filename.pdf][section=17A]
>>
>> prototype attached (first process crap, then load)
> 
> Hi Hans,
> 
> it would be great to have something like:
> 
>    \loadsection	[1] [2] [3]
> 
>    1	FILE
>    2	REFERENCE
>    3	inherits from \setupexternalfigure
> 
> Just in case it may be relevant to the discussion.
that is not flexible ... we're talking about a rather special 
application, so what I can add is a simple helper that returns the first 
and last page of a section

\dostepwiserecurse {\firstsectionpage[crap][chapter:3]} 
{\lastsectionpage[crap][chapter:3]} {1} {
     \startpagemakeup
         \externalfigure[crap.pdf][page=#1]
     \stoppagemakeup
}

\dostepwiserecurse {\firstsectionpage[crap][chapter:5]} 
{\lastsectionpage[crap][chapter:5]} {1} {
     \dontleavehmode
     \externalfigure[crap.pdf][page=#1,width=3cm,frame=on]%
     \space\allowbreak
}

keep in mind that it is also a biut fragile as one never know where the 
last one ends

Hans



-----------------------------------------------------------------
                                           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 / 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-12-05 17:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1550657480.592642.1670193056410.ref@mail.yahoo.com>
2022-12-04 22:30 ` Joel via ntg-context
2022-12-05  9:42   ` Denis Maier via ntg-context
2022-12-05 10:03   ` Henning Hraban Ramm via ntg-context
2022-12-05 12:13   ` Hans Hagen via ntg-context
2022-12-05 16:39     ` Pablo Rodriguez via ntg-context
2022-12-05 17:30       ` Hans Hagen via ntg-context [this message]
2022-12-05 18:23         ` Pablo Rodriguez via ntg-context
2022-12-05 20:22           ` Hans Hagen via ntg-context
2022-12-06  0:39     ` Joel via ntg-context
2022-12-06  8:05       ` Hans Hagen via ntg-context
2022-12-06 17:33         ` Pablo Rodriguez via ntg-context
2022-12-06 19:02           ` Hans Hagen 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=21ac1c97-97be-9ad6-f8f0-d733c41cbfe4@freedom.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@freedom.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).