weird pdf bookmarks question
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
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Taco Hoekwater