ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* weird pdf bookmarks question
@ 2012-05-31  9:23 Taco Hoekwater
  2012-05-31 10:29 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Taco Hoekwater @ 2012-05-31  9:23 UTC (permalink / raw)
  To: ntg-context

Hi all,

I have a question about PDF bookmarks. My Document goes like this (heavily simplified):

\setupinteraction[state=start]
\placebookmarks[chapter,section][chapter,section]
\setupinteractionscreen[option=bookmark]
\starttext
\chapter[item1]{Overview}
\startitemize
\item[item4] bla
\stopitemize
\chapter[item2]{Two}
Greetings!
\chapter[item3]{Three}
I don't know
\chapter{Four}
Oh no.
\stoptext

Now, what I would really like is if the link in the bookmarks for 'Four' jumps to the first
page (where the 'item4' reference target lives) instead of to the fourth page (where the 
chapter header lives). 

The question is: is this possible, and if yes, how? To further complicate things, this
is an old project that uses mkii, so lua-based solutions are not helpful.

Thanks in advance for any pointers,

Taco
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: weird pdf bookmarks question
  2012-05-31  9:23 weird pdf bookmarks question Taco Hoekwater
@ 2012-05-31 10:29 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2012-05-31 10:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Taco Hoekwater

On 31-5-2012 11:23, Taco Hoekwater wrote:
> Hi all,
>
> I have a question about PDF bookmarks. My Document goes like this (heavily simplified):
>
> \setupinteraction[state=start]
> \placebookmarks[chapter,section][chapter,section]
> \setupinteractionscreen[option=bookmark]
> \starttext
> \chapter[item1]{Overview}
> \startitemize
> \item[item4] bla
> \stopitemize
> \chapter[item2]{Two}
> Greetings!
> \chapter[item3]{Three}
> I don't know
> \chapter{Four}
> Oh no.
> \stoptext
>
> Now, what I would really like is if the link in the bookmarks for 'Four' jumps to the first
> page (where the 'item4' reference target lives) instead of to the fourth page (where the
> chapter header lives).

technically we can have links as booksmarks but then the question is 
what interface to use

> The question is: is this possible, and if yes, how? To further complicate things, this
> is an old project that uses mkii, so lua-based solutions are not helpful.

lucky me that mkii is frozen

> Thanks in advance for any pointers,

maybe mess around with lists .. but what is really needed is some 
overload of a page .. here's a starting point

\def\RemapBookmarkPage#1#2%
   {\setvalue{RemapBookmarkPage:#1}{#2}}

\let\normaldoPDFbookmark\doPDFbookmark

\def\doPDFbookmark#1#2#3#4#5%
 
{\normaldoPDFbookmark{#1}{#2}{#3}{\executeifdefined{RemapBookmarkPage:#4}{#4}}{#5}}

\RemapBookmarkPage{4}{1}

Of course one needs to hook earlier into code but the principle is the same.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2012-05-31 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31  9:23 weird pdf bookmarks question Taco Hoekwater
2012-05-31 10:29 ` Hans Hagen

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