ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bookmarks problems
@ 2004-12-13 15:40 Christopher Creutzig
  2004-12-13 19:15 ` Adam Lindsay
  2004-12-14  0:28 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Christopher Creutzig @ 2004-12-13 15:40 UTC (permalink / raw)


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

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

* Re: bookmarks problems
  2004-12-13 15:40 bookmarks problems Christopher Creutzig
@ 2004-12-13 19:15 ` Adam Lindsay
  2004-12-15 17:32   ` Hans Hagen
  2004-12-14  0:28 ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: Adam Lindsay @ 2004-12-13 19:15 UTC (permalink / raw)


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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

* Re: bookmarks problems
  2004-12-13 15:40 bookmarks problems Christopher Creutzig
  2004-12-13 19:15 ` Adam Lindsay
@ 2004-12-14  0:28 ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2004-12-14  0:28 UTC (permalink / raw)


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

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

* Re: bookmarks problems
  2004-12-13 19:15 ` Adam Lindsay
@ 2004-12-15 17:32   ` Hans Hagen
  2004-12-16 16:33     ` Adam Lindsay
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2004-12-15 17:32 UTC (permalink / raw)


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 {<</S /GoTo /D [\PDFobjectreference\space\PDFpageviewwrd]>>}%
      \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
-----------------------------------------------------------------

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

* Re: bookmarks problems
  2004-12-15 17:32   ` Hans Hagen
@ 2004-12-16 16:33     ` Adam Lindsay
  0 siblings, 0 replies; 5+ messages in thread
From: Adam Lindsay @ 2004-12-16 16:33 UTC (permalink / raw)


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 {<</S /GoTo /D [\PDFobjectreference\space\PDFpageviewwrd]>>}%
>      \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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

end of thread, other threads:[~2004-12-16 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-13 15:40 bookmarks problems Christopher Creutzig
2004-12-13 19:15 ` Adam Lindsay
2004-12-15 17:32   ` Hans Hagen
2004-12-16 16:33     ` Adam Lindsay
2004-12-14  0:28 ` 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).