ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Unwanted blank page before page figures when using non-placed (hidden) heads
@ 2022-07-24 21:35 cryo shock via ntg-context
  2022-07-25  7:19 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: cryo shock via ntg-context @ 2022-07-24 21:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: cryo shock


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

Hey there,

I am having trouble understanding some basic blank page behavior. I hope
that somebody of you can point me in the right direction.

My primary goal is to create application documents consisting of various
.tex components and with external PDF pages inserted as well. The second
part of that goal is to use multiple-level bookmarking as well. Bookmarking
should look like this:

- Letter
- Resume
- Testimonies
-- Testimony A
-- Testimony B
-- Testimony C

In the following MWE you can see my progress along with some notes to help
understanding.

There are two questions, I'd wish could be answered:

1. Why does TeX insert a blank page before a pagefigure I enclose within a
(hidden) head?

2. Can the \bookmark[list]{text} command be somehow used for multi-level
bookmarking?

While the first question would make up for a more consistent solution, the
second question would do the job as well.

I hope some of you can enlighten me.

Cheers, k


%%% START of MWE

\definehead[VisiSection][section]
\setuphead[VisiSection][number=no]

\definehead[InvisiSection][VisiSection]
\setuphead[InvisiSection][placehead=no]

\definelist[CustomBMarks]

\setupinteraction[state=start]
\placebookmarks[VisiSection,InvisiSection,CustomBMarks]

\startcomponent * % not a product, no
  \startVisiSection[title={Custom Section A}]
    Text of Custom Section A
  \stopVisiSection
  \page
  \startVisiSection[title={Custom Section B}]
    Text of Custom Section B
  \stopVisiSection
  \startInvisiSection[title={Hidden Custom Section A}]
    Text of Hidden Custom Section A
  \stopInvisiSection
  \page
  \startInvisiSection[title={Hidden Custom Section B}]
    Text of Hidden Custom Section B
  \stopInvisiSection
  \page
  TEST\bookmark[CustomBMarks]{Start of Teststack} \dorecurse{800}{TEST
}NEEDLE\bookmark[CustomBMarks]{Needle in the Teststack}
\dorecurse{400}{TEST }TEST.\bookmark[CustomBMarks]{End of Teststack}
  %%%
  %%% So far no problems.
  %%% The following combination does the job, but I see no possibility
  %%% to arrange the "CustomBMarks"-list in multi-levels.
  %%%
  \page
  \startstandardmakeup
    \filterpages[{test.pdf}][1]\bookmark[CustomBMarks]{Pagefigure}
  \stopstandardmakeup
  %%%
  %%% So the following method would be the best choice to work with
  %%% multi-level bookmarks. But as soon as I start working with
  %%% (custom) heads together with pagefigures, CTX places a blank
  %%% page before every figure...
  %%% Note: you don't need a dummy file. The last (unnumbered) page is
  %%% the wanted external PDF. The numbered page before is the unwanted one.
  %%%
  \startInvisiSection[title={External Testpage A}]
    \startstandardmakeup
      \filterpages[{test.pdf}][1]
    \stopstandardmakeup
  \stopInvisiSection
\stopcomponent

%%% END of MWE

[-- Attachment #1.2: Type: text/html, Size: 7262 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] 3+ messages in thread

* Re: Unwanted blank page before page figures when using non-placed (hidden) heads
  2022-07-24 21:35 Unwanted blank page before page figures when using non-placed (hidden) heads cryo shock via ntg-context
@ 2022-07-25  7:19 ` Hans Hagen via ntg-context
  2022-07-30  2:16   ` cryo shock via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2022-07-25  7:19 UTC (permalink / raw)
  To: cryo shock via ntg-context; +Cc: Hans Hagen

On 7/24/2022 11:35 PM, cryo shock via ntg-context wrote:
> Hey there,
> 
> I am having trouble understanding some basic blank page behavior. I hope 
> that somebody of you can point me in the right direction.
> 
> My primary goal is to create application documents consisting of various 
> .tex components and with external PDF pages inserted as well. The second 
> part of that goal is to use multiple-level bookmarking as well. 
> Bookmarking should look like this:
> 
> - Letter
> - Resume
> - Testimonies
> -- Testimony A
> -- Testimony B
> -- Testimony C
> 
> In the following MWE you can see my progress along with some notes to 
> help understanding.
> 
> There are two questions, I'd wish could be answered:
> 
> 1. Why does TeX insert a blank page before a pagefigure I enclose within 
> a (hidden) head?
> 
> 2. Can the \bookmark[list]{text} command be somehow used for multi-level 
> bookmarking?
> 
> While the first question would make up for a more consistent solution, 
> the second question would do the job as well.
> 
> I hope some of you can enlighten me.
> 
> Cheers, k
> 
> 
> %%% START of MWE
> 
> \definehead[VisiSection][section]
> \setuphead[VisiSection][number=no]
> 
> \definehead[InvisiSection][VisiSection]
> \setuphead[InvisiSection][placehead=no]
> 
> \definelist[CustomBMarks]
> 
> \setupinteraction[state=start]
> \placebookmarks[VisiSection,InvisiSection,CustomBMarks]
> 
> \startcomponent * % not a product, no
>    \startVisiSection[title={Custom Section A}]
>      Text of Custom Section A
>    \stopVisiSection
>    \page
>    \startVisiSection[title={Custom Section B}]
>      Text of Custom Section B
>    \stopVisiSection
>    \startInvisiSection[title={Hidden Custom Section A}]
>      Text of Hidden Custom Section A
>    \stopInvisiSection
>    \page
>    \startInvisiSection[title={Hidden Custom Section B}]
>      Text of Hidden Custom Section B
>    \stopInvisiSection
>    \page
>    TEST\bookmark[CustomBMarks]{Start of Teststack} \dorecurse{800}{TEST 
> }NEEDLE\bookmark[CustomBMarks]{Needle in the Teststack} 
> \dorecurse{400}{TEST }TEST.\bookmark[CustomBMarks]{End of Teststack}
>    %%%
>    %%% So far no problems.
>    %%% The following combination does the job, but I see no possibility
>    %%% to arrange the "CustomBMarks"-list in multi-levels.
>    %%%
>    \page
>    \startstandardmakeup
>      \filterpages[{test.pdf}][1]\bookmark[CustomBMarks]{Pagefigure}
>    \stopstandardmakeup
>    %%%
>    %%% So the following method would be the best choice to work with
>    %%% multi-level bookmarks. But as soon as I start working with
>    %%% (custom) heads together with pagefigures, CTX places a blank
>    %%% page before every figure...
>    %%% Note: you don't need a dummy file. The last (unnumbered) page is
>    %%% the wanted external PDF. The numbered page before is the unwanted 
> one.
>    %%%
>    \startInvisiSection[title={External Testpage A}]
>      \startstandardmakeup
>        \filterpages[{test.pdf}][1]
>      \stopstandardmakeup
>    \stopInvisiSection
> \stopcomponent
because even a hidden head is something (anchor on page), you can try this:

     \startstandardmakeup
   \startInvisiSection[title={External Testpage A}]
       \filterpages[{test.pdf}][1]
   \stopInvisiSection
     \stopstandardmakeup

-----------------------------------------------------------------
                                           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] 3+ messages in thread

* Re: Unwanted blank page before page figures when using non-placed (hidden) heads
  2022-07-25  7:19 ` Hans Hagen via ntg-context
@ 2022-07-30  2:16   ` cryo shock via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: cryo shock via ntg-context @ 2022-07-30  2:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: cryo shock


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

Of course it works, it's the order.
For me TeX wouldn't be the same without you. Thank you very much Hans.

Hans Hagen via ntg-context <ntg-context@ntg.nl> schrieb am Mo., 25. Juli
2022, 09:20:

> On 7/24/2022 11:35 PM, cryo shock via ntg-context wrote:
> > Hey there,
> >
> > I am having trouble understanding some basic blank page behavior. I hope
> > that somebody of you can point me in the right direction.
> >
> > My primary goal is to create application documents consisting of various
> > .tex components and with external PDF pages inserted as well. The second
> > part of that goal is to use multiple-level bookmarking as well.
> > Bookmarking should look like this:
> >
> > - Letter
> > - Resume
> > - Testimonies
> > -- Testimony A
> > -- Testimony B
> > -- Testimony C
> >
> > In the following MWE you can see my progress along with some notes to
> > help understanding.
> >
> > There are two questions, I'd wish could be answered:
> >
> > 1. Why does TeX insert a blank page before a pagefigure I enclose within
> > a (hidden) head?
> >
> > 2. Can the \bookmark[list]{text} command be somehow used for multi-level
> > bookmarking?
> >
> > While the first question would make up for a more consistent solution,
> > the second question would do the job as well.
> >
> > I hope some of you can enlighten me.
> >
> > Cheers, k
> >
> >
> > %%% START of MWE
> >
> > \definehead[VisiSection][section]
> > \setuphead[VisiSection][number=no]
> >
> > \definehead[InvisiSection][VisiSection]
> > \setuphead[InvisiSection][placehead=no]
> >
> > \definelist[CustomBMarks]
> >
> > \setupinteraction[state=start]
> > \placebookmarks[VisiSection,InvisiSection,CustomBMarks]
> >
> > \startcomponent * % not a product, no
> >    \startVisiSection[title={Custom Section A}]
> >      Text of Custom Section A
> >    \stopVisiSection
> >    \page
> >    \startVisiSection[title={Custom Section B}]
> >      Text of Custom Section B
> >    \stopVisiSection
> >    \startInvisiSection[title={Hidden Custom Section A}]
> >      Text of Hidden Custom Section A
> >    \stopInvisiSection
> >    \page
> >    \startInvisiSection[title={Hidden Custom Section B}]
> >      Text of Hidden Custom Section B
> >    \stopInvisiSection
> >    \page
> >    TEST\bookmark[CustomBMarks]{Start of Teststack} \dorecurse{800}{TEST
> > }NEEDLE\bookmark[CustomBMarks]{Needle in the Teststack}
> > \dorecurse{400}{TEST }TEST.\bookmark[CustomBMarks]{End of Teststack}
> >    %%%
> >    %%% So far no problems.
> >    %%% The following combination does the job, but I see no possibility
> >    %%% to arrange the "CustomBMarks"-list in multi-levels.
> >    %%%
> >    \page
> >    \startstandardmakeup
> >      \filterpages[{test.pdf}][1]\bookmark[CustomBMarks]{Pagefigure}
> >    \stopstandardmakeup
> >    %%%
> >    %%% So the following method would be the best choice to work with
> >    %%% multi-level bookmarks. But as soon as I start working with
> >    %%% (custom) heads together with pagefigures, CTX places a blank
> >    %%% page before every figure...
> >    %%% Note: you don't need a dummy file. The last (unnumbered) page is
> >    %%% the wanted external PDF. The numbered page before is the unwanted
> > one.
> >    %%%
> >    \startInvisiSection[title={External Testpage A}]
> >      \startstandardmakeup
> >        \filterpages[{test.pdf}][1]
> >      \stopstandardmakeup
> >    \stopInvisiSection
> > \stopcomponent
> because even a hidden head is something (anchor on page), you can try this:
>
>      \startstandardmakeup
>    \startInvisiSection[title={External Testpage A}]
>        \filterpages[{test.pdf}][1]
>    \stopInvisiSection
>      \stopstandardmakeup
>
> -----------------------------------------------------------------
>                                            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: 6314 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] 3+ messages in thread

end of thread, other threads:[~2022-07-30  2:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24 21:35 Unwanted blank page before page figures when using non-placed (hidden) heads cryo shock via ntg-context
2022-07-25  7:19 ` Hans Hagen via ntg-context
2022-07-30  2:16   ` cryo shock 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).