bookmarks problems
![](https://secure.gravatar.com/avatar/3d86d93abcc56d7b5843cc1ce58bbfd6.jpg?s=120&d=mm&r=g)
Salvete, I have two problems with bookmarks: - Preview.App does display the list of bookmarks, but they do not work. The same file has no such problems in Adobe. (There are files with bookmarks that work ok in Preview.App, such as the Adobe JavaScript reference.) - I fail to provide a bookmark different from a chapter title, if that title is not followed by text, but directly by a \section command. Whether I place \bookmark in front of or behind the \chapter command, it affects the next section command with text behind it. \setupinteraction[state=start] \placebookmarks[chapter,section] \starttext \chapter{normal chapter} \section{one} \chapter{\quotation{special} chapter} \bookmark{"special" chapter} \section{two} \section{three} test \stoptext regards, Christopher Creutzig
![](https://secure.gravatar.com/avatar/a5d42c1ccacf33c72fd502fe1bb5ffa9.jpg?s=120&d=mm&r=g)
Christopher Creutzig said this at Mon, 13 Dec 2004 16:40:13 +0100:
- Preview.App does display the list of bookmarks, but they do not work. The same file has no such problems in Adobe. (There are files with bookmarks that work ok in Preview.App, such as the Adobe JavaScript reference.)
Apple has a limited idea of what's a reference in the bookmark list. They only have a partial implementation of the spec. Hans's use of the PDF spec with the bookmarks is a little "loose." I studied this in more detail with respect to XeTeX. I might be able to find some of that correspondence. Oh, here it is:
If so, I'd be interested to see the PDF that results (pdfTeX, at least, can be told not to compress the PDF streams, can't it?), so as to get some idea of the link types that Preview understands.
It turns out that it understands indirect links very well. That is, the first fails: /S/GoTo/D [ 4/Fit] ...where "4" is the page number, but the second succeeds: /S/GoTo/D [ 36 0 R /Fit] ...where 36 is the object number of a /Type /Page object in the PDF file.
Yeah, that sums up the difference between a link that doesn't work, and one that does, in Preview.app. ConTeXt may use a bit of JavaScript in some of its links, which Preview.app has a tough time with. I haven't looked at this in detail lately, and barely at all with the pdftex drivers. Hans, do you think it would be hard to turn direct page links into indirect links (point to page object)? adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Adam Lindsay wrote:
I haven't looked at this in detail lately, and barely at all with the pdftex drivers. Hans, do you think it would be hard to turn direct page links into indirect links (point to page object)?
can you check this: \def\doPDFbookmark level #1 n #2 text #3 page #4 open #5% {\scratchcounter#4\advance\scratchcounter\plusone % temp hack, better here \expanded{\doPDFgetpagereference{\the\scratchcounter}}\PDFobjectreference \pdfoutline user {<>}% \ifcase#2 \else count \ifcase#5-\fi#2 \fi {#3}} \setupinteraction[state=start] \placebookmarks[chapter] \starttext \chapter{one} \chapter{two} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/a5d42c1ccacf33c72fd502fe1bb5ffa9.jpg?s=120&d=mm&r=g)
Hans Hagen said this at Wed, 15 Dec 2004 18:32:22 +0100:
I haven't looked at this in detail lately, and barely at all with the pdftex drivers. Hans, do you think it would be hard to turn direct page links into indirect links (point to page object)?
can you check this:
\def\doPDFbookmark level #1 n #2 text #3 page #4 open #5% {\scratchcounter#4\advance\scratchcounter\plusone % temp hack, better here \expanded{\doPDFgetpagereference{\the\scratchcounter}}\PDFobjectreference \pdfoutline user {<>}% \ifcase#2 \else count \ifcase#5-\fi#2 \fi {#3}}
Yes! much happier in Apple's Preview! Cheers, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Christopher Creutzig wrote:
I have two problems with bookmarks:
- Preview.App does display the list of bookmarks, but they do not work. The same file has no such problems in Adobe. (There are files with bookmarks that work ok in Preview.App, such as the Adobe JavaScript reference.)
preview is buggy and weak on interactive features
- I fail to provide a bookmark different from a chapter title, if that title is not followed by text, but directly by a \section command. Whether I place \bookmark in front of or behind the \chapter command, it affects the next section command with text behind it.
i'll fix this, for the moment say: \appendtoks\def\quotation#1{"#1"}\to\simplifiedcommands \appendtoks\def\quote #1{'#1'}\to\simplifiedcommands ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Adam Lindsay
-
Christopher Creutzig
-
Hans Hagen