ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Placing extra bookmarks?
@ 2020-12-01 14:36 Bruce Horrocks
  2020-12-01 16:37 ` Henning Hraban Ramm
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2020-12-01 14:36 UTC (permalink / raw)
  To: ntg-context

I have \placebookmarks[chapter] in my doc and all is fine except that I'd like to force an extra bookmark at the top of the list that jumps to the cover page. However there is no chapter title, or other built in style on the cover.

I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no error, no bookmark.

Any suggestions please? There's no need to bookmark to a specific point - just going to page 1 would be enough.

(I have looked through the mailing list archives but can't find quite the same scenario.)

--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Placing extra bookmarks?
  2020-12-01 14:36 Placing extra bookmarks? Bruce Horrocks
@ 2020-12-01 16:37 ` Henning Hraban Ramm
  2020-12-01 23:10   ` Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2020-12-01 16:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks <ntg@scorecrow.com>:
> 
> I have \placebookmarks[chapter] in my doc and all is fine except that I'd like to force an extra bookmark at the top of the list that jumps to the cover page. However there is no chapter title, or other built in style on the cover.
> 
> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no error, no bookmark.
> 
> Any suggestions please? There's no need to bookmark to a specific point - just going to page 1 would be enough.

Did you enable interactions? \setupinteractions[state=start]

But when I recently tried to manually set some bookmarks instead of visible chapter titles, I also didn’t get any; didn’t investigate further yet.

Hraban

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Placing extra bookmarks?
  2020-12-01 16:37 ` Henning Hraban Ramm
@ 2020-12-01 23:10   ` Bruce Horrocks
  2020-12-02 18:42     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2020-12-01 23:10 UTC (permalink / raw)
  To: ntg-context

On 1 Dec 2020, at 16:37, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks <ntg@scorecrow.com>:
>> 
>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd like to force an extra bookmark at the top of the list that jumps to the cover page. However there is no chapter title, or other built in style on the cover.
>> 
>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no error, no bookmark.
>> 
>> Any suggestions please? There's no need to bookmark to a specific point - just going to page 1 would be enough.
> 
> Did you enable interactions? \setupinteractions[state=start]
> 
> But when I recently tried to manually set some bookmarks instead of visible chapter titles, I also didn’t get any; didn’t investigate further yet.

Thanks for the suggestion, but I already had \setupinteraction[state=start] set. (Note 'interaction' - no 's')

I eventually found a previous thread on the mailing list archive.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg86919.html>

From that I was able to add the following to my document setup:

  \definehead [Bookmark] [title] 
    [ placehead=empty,
      before={},
      after={},
    ]
  \setupinteraction[state=start]
  \setupinteractionscreen[option=bookmark] 
  \placebookmarks[chapter,heading,Bookmark][chapter][force=yes]

And then in the text where I want each extra bookmark to appear I use:

  \Bookmark[title={The text of the bookmark}]
  
This works but is a bit of a kludge because it assumes that you aren't using 'title' sections in your document already. If you are then they will all appear in the PDF bookmarks.

Also note that the bookmark is inserted at the chapter/title level. If you want a sub-bookmark then you need to add another custom heading, viz:

  \definehead [SubBookmark] [subject] 
    [ placehead=empty,
      before={},
      after={},
    ]

and add it into the \placebookmarks list:

  \placebookmarks[chapter,heading,Bookmark,SubBookmark][chapter][force=yes]

and invoke it using:

  \SubBookmark[title={A sub-bookmark}]

In the PDF, this will be nested under the previous higher-level bookmark.

Given that this is a kludge, and that the \bookmark command doesn't seem to work at all, perhaps it can be resurrected into a new form, something like:

  \bookmark[n][focus]{Text}

  - n is the level 1, 2, 3 etc
  - (optional) focus overrides \setupinteraction (assuming PDF allows it)
  - text is the text to show 

and have this insert a bookmark at that point, regardless of whatever the heading mechanism is doing?

Regards,
--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Placing extra bookmarks?
  2020-12-01 23:10   ` Bruce Horrocks
@ 2020-12-02 18:42     ` Hans Hagen
  2020-12-02 22:33       ` Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-12-02 18:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Bruce Horrocks

On 12/2/2020 12:10 AM, Bruce Horrocks wrote:
> On 1 Dec 2020, at 16:37, Henning Hraban Ramm <texml@fiee.net> wrote:
>>
>>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks <ntg@scorecrow.com>:
>>>
>>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd like to force an extra bookmark at the top of the list that jumps to the cover page. However there is no chapter title, or other built in style on the cover.
>>>
>>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no error, no bookmark.
>>>
>>> Any suggestions please? There's no need to bookmark to a specific point - just going to page 1 would be enough.
>>
>> Did you enable interactions? \setupinteractions[state=start]
>>
>> But when I recently tried to manually set some bookmarks instead of visible chapter titles, I also didn’t get any; didn’t investigate further yet.
there are some examples in the test suite (sections/bookmarks-*.tex)

You can specify bookmarks when you use \startsection etc an dalso add 
them any place to named lists.

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 / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Placing extra bookmarks?
  2020-12-02 18:42     ` Hans Hagen
@ 2020-12-02 22:33       ` Bruce Horrocks
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Horrocks @ 2020-12-02 22:33 UTC (permalink / raw)
  To: ntg-context



> On 2 Dec 2020, at 18:42, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> On 12/2/2020 12:10 AM, Bruce Horrocks wrote:
>> On 1 Dec 2020, at 16:37, Henning Hraban Ramm <texml@fiee.net> wrote:
>>> 
>>>> Am 01.12.2020 um 15:36 schrieb Bruce Horrocks <ntg@scorecrow.com>:
>>>> 
>>>> I have \placebookmarks[chapter] in my doc and all is fine except that I'd like to force an extra bookmark at the top of the list that jumps to the cover page. However there is no chapter title, or other built in style on the cover.
>>>> 
>>>> I tried inserting \bookmark[chapter]{The Cover} but nothing happened - no error, no bookmark.
>>>> 
>>>> Any suggestions please? There's no need to bookmark to a specific point - just going to page 1 would be enough.
>>> 
>>> Did you enable interactions? \setupinteractions[state=start]
>>> 
>>> But when I recently tried to manually set some bookmarks instead of visible chapter titles, I also didn’t get any; didn’t investigate further yet.
> there are some examples in the test suite (sections/bookmarks-*.tex)
> 
> You can specify bookmarks when you use \startsection etc an dalso add them any place to named lists.

Thanks Hans - I never thought to look in the test cases (d'oh!).

For the benefit of those searching the archives in the future, here is an MWE adapted from one of the test cases that places one bookmark via a chapter heading and one manually that is not linked to any document section.

\enabletrackers[references.bookmarks,backend.resources] % For debug only

\setupinteraction
  [state=start]

\setupinteractionscreen
  [option=bookmark]

\definelist
  [mylist]
  
\placebookmarks[chapter,mylist]

\starttext
    \input zapf
    \bookmark[mylist]{Bookmark not linked to a section heading}
    \input zapf
	
    \page[yes]
    \startchapter[title=Tufte]
        \input tufte
    \stopchapter
\stoptext

I shall add it to the Wiki.
--
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-12-02 22:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 14:36 Placing extra bookmarks? Bruce Horrocks
2020-12-01 16:37 ` Henning Hraban Ramm
2020-12-01 23:10   ` Bruce Horrocks
2020-12-02 18:42     ` Hans Hagen
2020-12-02 22:33       ` Bruce Horrocks

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