ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to display the pages of a particular section in another PDF?
       [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
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Joel via ntg-context @ 2022-12-04 22:30 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 554 bytes --]

I can use this code to display page 5 from a PDF:\externalfigure[filename.pdf][page=5]I am making a teacher's guide for a workbook (workbook.pdf). I need to be able to display on the page all pages of a particular section.
The teacher's guide uses the same section titles as the workbook, e.g.:
17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's guide and the workbook.

Is there any way to tell ConTeXt to display all of the pages for a particular section?
\externalfigure[filename.pdf][section=17A]
--Joel

[-- Attachment #1.2: Type: text/html, Size: 1912 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-04 22:30 ` How to display the pages of a particular section in another PDF? 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
  2 siblings, 0 replies; 12+ messages in thread
From: Denis Maier via ntg-context @ 2022-12-05  9:42 UTC (permalink / raw)
  To: ntg-context; +Cc: denis.maier


[-- Attachment #1.1: Type: text/plain, Size: 1041 bytes --]

Don’t know about ConTeXt. But maybe you might want to have a look at pdftk. You could try to produce per-section pdfs and include those.

Best,
Denis

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Joel via ntg-context
Gesendet: Sonntag, 4. Dezember 2022 23:31
An: Mailing List for ConTeXt Users <ntg-context@ntg.nl>
Cc: Joel <uaru99@yahoo.com>
Betreff: [NTG-context] How to display the pages of a particular section in another PDF?

I can use this code to display page 5 from a PDF:

\externalfigure[filename.pdf][page=5]
I am making a teacher's guide for a workbook (workbook.pdf). I need to be able to display on the page all pages of a particular section.

The teacher's guide uses the same section titles as the workbook, e.g.:

17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's guide and the workbook.

Is there any way to tell ConTeXt to display all of the pages for a particular section?


\externalfigure[filename.pdf][section=17A]

--Joel

[-- Attachment #1.2: Type: text/html, Size: 6488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-04 22:30 ` How to display the pages of a particular section in another PDF? 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
  2 siblings, 0 replies; 12+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-12-05 10:03 UTC (permalink / raw)
  To: ntg-context; +Cc: Henning Hraban Ramm

Am 04.12.22 um 23:30 schrieb Joel via ntg-context:
> I can use this code to display page 5 from a PDF:
> 
> \externalfigure[filename.pdf][page=5]
> 
> I am making a teacher's guide for a workbook (workbook.pdf). I need to 
> be able to display on the page all pages of a particular section.
> 
> The teacher's guide uses the same section titles as the workbook, e.g.:
> 
> 17-A: Title
> 17-B: Title
> 
> In other words, there is 1:1 pairing of section titles in the teacher's 
> guide and the workbook.
> 
> Is there any way to tell ConTeXt to display all of the pages for a 
> particular section?
> 
> \externalfigure[filename.pdf][section=17A]

Use a loop in Lua or TeX:

https://wiki.contextgarden.net/System_Macros/Loops_and_Recursion

\dostepwiserecurse {5} {17} {1} 
{\externalfigure[filename.pdf][page=\recurselevel]}

or

\startluacode

for s=5, 17 do
   context.externalfigure({"filename.pdf"},{page=s})
end

\stopluacode

(untested)

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-04 22:30 ` How to display the pages of a particular section in another PDF? 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-06  0:39     ` Joel via ntg-context
  2 siblings, 2 replies; 12+ messages in thread
From: Hans Hagen via ntg-context @ 2022-12-05 12:13 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

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][page=5]
> 
> I am making a teacher's guide for a workbook (workbook.pdf). I need to 
> be able to display on the page all pages of a particular section.
> 
> The teacher's guide uses the same section titles as the workbook, e.g.:
> 
> 17-A: Title
> 17-B: Title
> 
> In other words, there is 1:1 pairing of section titles in the teacher's 
> guide and the workbook.
> 
> Is there any way to tell ConTeXt to display all of the pages for a 
> particular section?
> 
> \externalfigure[filename.pdf][section=17A]
prototype attached (first process crap, then load)

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

[-- Attachment #2: load.tex --]
[-- Type: text/plain, Size: 2459 bytes --]


\startluacode
    document.foundsection = { first = 0, last  = 0 }

    function document.loadsection(filename,reference)
        local data = job.loadother(file.addsuffix(filename,"tuc"))
        if data then
            local lists = data.structures.lists.collected
            local pages = data.structures.pages.collected
            if lists and pages then
                for i=1,#lists do
                    local li = lists[i]
                    if li.references.reference == reference then
                        local first = 1
                        local last  = pages[#pages].number
                        local level = li.metadata.level
                        first = li.references.realpage
                        for j=i+1,#lists do
                            local lj = lists[j]
                            if lj.metadata.level == level then
                                last = lj.references.realpage - 1
                                break
                            end
                        end
                        document.foundsection.first = first
                        document.foundsection.last  = last
                    end
                end
            end
        end
    end
\stopluacode

% it depends what interface one wants ... we could have
%
% \externalfigure[crap.pdf][section=<reference>] % takes from crap
%
% but we need more inpiut and discussion for that

\starttexdefinition DoWithSection #1#2
    \startpagemakeup
        \externalfigure[#1.pdf][page=#2]
    \stoppagemakeup
\stoptexdefinition

\starttexdefinition LoadSectionsA #1#2
    \ctxlua{document.loadsection("#1","#2")}
    \doifnot{\cldcontext{document.foundsection.first}} {0} {
        \dostepwiserecurse
            {\cldcontext{document.foundsection.first}}
            {\cldcontext{document.foundsection.last}}
            {1}
            {
                \DoWithSection{#1}{\recurselevel}
            }
    }
\stoptexdefinition

\starttexdefinition spaces LoadSectionsB #1#2
    \ctxlua{
        document.loadsection("#1","#2")
        if document.foundsection.first > 0 then
            for i=document.foundsection.first,document.foundsection.last do
                context.DoWithSection("#1",i)
            end
        end
    }
\stoptexdefinition

\starttext

    \LoadSectionsA{crap}{chapter:3}

    \LoadSectionsB{crap}{chapter:2}

\stoptext

[-- Attachment #3: crap.tex --]
[-- Type: text/plain, Size: 417 bytes --]

\starttext

\dorecurse{10}{
    \startchapter[title=Chapter #1,reference=chapter:#1]
        \dorecurse{10}{
            \startsubject[title=Subject #1]
                \dorecurse{2}{\samplefile{tufte}\par}
            \stopsubject
            \startsection[title=Section #1.##1,reference=#1.##1]
                \dorecurse{10}{\samplefile{tufte}\par}
            \stopsection
        }
    \stopchapter
}

\stoptext

[-- Attachment #4: Type: text/plain, Size: 496 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  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
  2022-12-06  0:39     ` Joel via ntg-context
  1 sibling, 1 reply; 12+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-12-05 16:39 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez

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.

Many thanks for your help,

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-05 16:39     ` Pablo Rodriguez via ntg-context
@ 2022-12-05 17:30       ` Hans Hagen via ntg-context
  2022-12-05 18:23         ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen via ntg-context @ 2022-12-05 17:30 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-05 17:30       ` Hans Hagen via ntg-context
@ 2022-12-05 18:23         ` Pablo Rodriguez via ntg-context
  2022-12-05 20:22           ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-12-05 18:23 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez

On 12/5/22 18:30, Hans Hagen via ntg-context wrote:
> On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> it would be great to have something like:
>>
>>    \loadsection	[1] [2] [3]
>> [...]
> 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

That would be great for me.

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

I wondered whether \doifreference{\lastsectionpage[file][reference]}
would make sense here, but this would probably be a way of unnecesarily
complicating things...

Many thanks for your help,

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-05 18:23         ` Pablo Rodriguez via ntg-context
@ 2022-12-05 20:22           ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen via ntg-context @ 2022-12-05 20:22 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 12/5/2022 7:23 PM, Pablo Rodriguez via ntg-context wrote:
> On 12/5/22 18:30, Hans Hagen via ntg-context wrote:
>> On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:
>>> [...]
>>> it would be great to have something like:
>>>
>>>     \loadsection	[1] [2] [3]
>>> [...]
>> 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
> 
> That would be great for me.
> 
>> keep in mind that it is also a biut fragile as one never know where the
>> last one ends
> 
> I wondered whether \doifreference{\lastsectionpage[file][reference]}
> would make sense here, but this would probably be a way of unnecesarily
> complicating things...
for sure complicating, as i have no cleu what that would mean

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-05 12:13   ` Hans Hagen via ntg-context
  2022-12-05 16:39     ` Pablo Rodriguez via ntg-context
@ 2022-12-06  0:39     ` Joel via ntg-context
  2022-12-06  8:05       ` Hans Hagen via ntg-context
  1 sibling, 1 reply; 12+ messages in thread
From: Joel via ntg-context @ 2022-12-06  0:39 UTC (permalink / raw)
  To: ntg-context; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 1831 bytes --]

 Thanks so much! It took some work for me to figure out how to make it work, but it now works great!
--Joel

    On Monday, December 5, 2022 at 05:15:49 AM MST, Hans Hagen via ntg-context <ntg-context@ntg.nl> 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][page=5]
> 
> I am making a teacher's guide for a workbook (workbook.pdf). I need to 
> be able to display on the page all pages of a particular section.
> 
> The teacher's guide uses the same section titles as the workbook, e.g.:
> 
> 17-A: Title
> 17-B: Title
> 
> In other words, there is 1:1 pairing of section titles in the teacher's 
> guide and the workbook.
> 
> Is there any way to tell ConTeXt to display all of the pages for a 
> particular section?
> 
> \externalfigure[filename.pdf][section=17A]
prototype attached (first process crap, then load)

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
___________________________________________________________________________________
  

[-- Attachment #1.2: Type: text/html, Size: 3941 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Hans Hagen via ntg-context @ 2022-12-06  8:05 UTC (permalink / raw)
  To: Joel, ntg-context; +Cc: Hans Hagen

On 12/6/2022 1:39 AM, Joel wrote:
> Thanks so much! It took some work for me to figure out how to make it 
> work, but it now works great!
i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will 
document at the wiki

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  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
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2022-12-06 17:33 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez

On 12/6/22 09:05, Hans Hagen via ntg-context wrote:
> On 12/6/2022 1:39 AM, Joel wrote:
>> Thanks so much! It took some work for me to figure out how to make it 
>> work, but it now works great!
> i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will 
> document at the wiki

Many thanks for the implementation, Hans.

https://wiki.contextgarden.net/Including_pages_from_PDF_documents
contains the new information (please, Joel, could you check whether the
explanation is clear?).

But I’m afraid I’m seeing a potential problem here, if the source PDF is
doublesided, \lastsectionpage from a reference may be an empty page.

Many thanks for your help,

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: How to display the pages of a particular section in another PDF?
  2022-12-06 17:33         ` Pablo Rodriguez via ntg-context
@ 2022-12-06 19:02           ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen via ntg-context @ 2022-12-06 19:02 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 12/6/2022 6:33 PM, Pablo Rodriguez via ntg-context wrote:
> On 12/6/22 09:05, Hans Hagen via ntg-context wrote:
>> On 12/6/2022 1:39 AM, Joel wrote:
>>> Thanks so much! It took some work for me to figure out how to make it
>>> work, but it now works great!
>> i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will
>> document at the wiki
> 
> Many thanks for the implementation, Hans.
> 
> https://wiki.contextgarden.net/Including_pages_from_PDF_documents
> contains the new information (please, Joel, could you check whether the
> explanation is clear?).
> 
> But I’m afraid I’m seeing a potential problem here, if the source PDF is
> doublesided, \lastsectionpage from a reference may be an empty page.
There is not much we do about that. Oen can then do

{\numexpr\lastsectionpage... -1\relax}

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-06 19:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1550657480.592642.1670193056410.ref@mail.yahoo.com>
2022-12-04 22:30 ` How to display the pages of a particular section in another PDF? 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
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

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).