ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Strange error with bookmarks
@ 2014-08-26 11:45 Michał Goliński
  2014-08-29 20:07 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Goliński @ 2014-08-26 11:45 UTC (permalink / raw)
  To: ntg-context

While trying to make a longer document with ConTeXt I stumbled into a 
strange error with the latest beta (I spotted it for the first time some 
time ago). For the following file:

\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
   \chapter{1}
   \chapter{2}
\stoppart
\startpart[title={B}]
   \chapter{3}
   \chapter{4}
   \chapter{5}
   \chapter{6}
   \chapter{7}
   \chapter{8}
   \chapter{9}
   \chapter{10}
\stoppart
\completecontent[criterium=all]
\stoptext


ConTeXt would generate a file in which the link for chapter "6" is not 
working. Neither the link in the table of contents works nor the link in 
the generated PDF bookmarks. When removing the second line, the link in 
the table of contents doesn't work, but everyting is ok if one removes 
the table of contents. What seems even more weird for me, the problem 
goes away if one removes *any* chapter. It persists for chapter "6" even 
if chapters are distributed differently between parts without changing 
their order.

Am I doing something wrong? I hope someone might be able to help.

Best regards

Michał
___________________________________________________________________________________
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] 4+ messages in thread

* Re: Strange error with bookmarks
  2014-08-26 11:45 Strange error with bookmarks Michał Goliński
@ 2014-08-29 20:07 ` Hans Hagen
  2014-10-14 11:41   ` Michał Goliński
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2014-08-29 20:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/26/2014 1:45 PM, Michał Goliński wrote:
> While trying to make a longer document with ConTeXt I stumbled into a
> strange error with the latest beta (I spotted it for the first time some
> time ago). For the following file:
>
> \setupinteraction[state=start,focus=standard]
> \placebookmarks[part,chapter][part,chapter][number=no]
> \starttext
> \chapter{0}
> \startpart[title={A}]
>    \chapter{1}
>    \chapter{2}
> \stoppart
> \startpart[title={B}]
>    \chapter{3}
>    \chapter{4}
>    \chapter{5}
>    \chapter{6}
>    \chapter{7}
>    \chapter{8}
>    \chapter{9}
>    \chapter{10}
> \stoppart
> \completecontent[criterium=all]
> \stoptext
>
>
> ConTeXt would generate a file in which the link for chapter "6" is not
> working. Neither the link in the table of contents works nor the link in
> the generated PDF bookmarks. When removing the second line, the link in
> the table of contents doesn't work, but everyting is ok if one removes
> the table of contents. What seems even more weird for me, the problem
> goes away if one removes *any* chapter. It persists for chapter "6" even
> if chapters are distributed differently between parts without changing
> their order.
>
> Am I doing something wrong? I hope someone might be able to help.

It works here (with summatrapdf) ... can it be a viewer issue? Do you 
run the latest context?

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] 4+ messages in thread

*  Strange error with bookmarks
  2014-08-29 20:07 ` Hans Hagen
@ 2014-10-14 11:41   ` Michał Goliński
  2014-10-14 14:58     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Michał Goliński @ 2014-10-14 11:41 UTC (permalink / raw)
  To: ntg-context

It does indeed be somehow connected with the specific reader that
I use (okular). Nevertheless, evince gives the same error, and I have found out,
that even jpdfbookmarks_cli has problems as it raises an exception when I try
to dump the bookmarks:

  Exception in thread "main" java.lang.ClassCastException: com.lowagie.text.pdf.PdfNumber cannot be cast to com.lowagie.text.pdf.PdfString

Still, in Acrobat Readers it works perfectly.

In the meantime I have came up with a ConTeXt solution, so one can compare
the resulting PDF files. Unfortunately I have only a limited understanding
of the details of PDF files.

The file giving the error is:

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
  \chapter{1}
  \chapter{2}
\stoppart
\startpart[title={B}]
  \chapter{3}
  \chapter{4}
  \chapter{5}
  \chapter{6}
  \chapter{7}
  \chapter{8}
  \chapter{9}
  \chapter{10}
\stoppart
\completecontent[criterium=all]
\stoptext

While the following files gives no problems in the applications that I have
tested (note the last command):

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
  \chapter{1}
  \chapter{2}
\stoppart
\startpart[title={B}]
  \chapter{3}
  \chapter{4}
  \chapter{5}
  \chapter{6}
  \chapter{7}
  \chapter{8}
  \chapter{9}
  \chapter{10}
\stoppart
\placecontent[criterium=all]
\stoptext


On 8/29/2014 22:07 PM, Hans Hagen wrote:
> On 8/26/2014 1:45 PM, Michał Goliński wrote:
> > While trying to make a longer document with ConTeXt I stumbled into a
> > strange error with the latest beta (I spotted it for the first time some
> > time ago). For the following file:
> >
> > \setupinteraction[state=start,focus=standard]
> > \placebookmarks[part,chapter][part,chapter][number=no]
> > \starttext
> > \chapter{0}
> > \startpart[title={A}]
> >    \chapter{1}
> >    \chapter{2}
> > \stoppart
> > \startpart[title={B}]
> >    \chapter{3}
> >    \chapter{4}
> >    \chapter{5}
> >    \chapter{6}
> >    \chapter{7}
> >    \chapter{8}
> >    \chapter{9}
> >    \chapter{10}
> > \stoppart
> > \completecontent[criterium=all]
> > \stoptext
> >
> >
> > ConTeXt would generate a file in which the link for chapter "6" is not
> > working. Neither the link in the table of contents works nor the link in
> > the generated PDF bookmarks. When removing the second line, the link in
> > the table of contents doesn't work, but everyting is ok if one removes
> > the table of contents. What seems even more weird for me, the problem
> > goes away if one removes *any* chapter. It persists for chapter "6" even
> > if chapters are distributed differently between parts without changing
> > their order.
> >
> > Am I doing something wrong? I hope someone might be able to help.
> 
> It works here (with summatrapdf) ... can it be a viewer issue? Do you 
> run the latest context?
> 
> 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] 4+ messages in thread

* Re: Strange error with bookmarks
  2014-10-14 11:41   ` Michał Goliński
@ 2014-10-14 14:58     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2014-10-14 14:58 UTC (permalink / raw)
  To: ntg-context

On 10/14/2014 1:41 PM, Michał Goliński wrote:
> It does indeed be somehow connected with the specific reader that
> I use (okular). Nevertheless, evince gives the same error, and I have found out,
> that even jpdfbookmarks_cli has problems as it raises an exception when I try
> to dump the bookmarks:
>
>    Exception in thread "main" java.lang.ClassCastException: com.lowagie.text.pdf.PdfNumber cannot be cast to com.lowagie.text.pdf.PdfString
>
> Still, in Acrobat Readers it works perfectly.

better in next beta

-----------------------------------------------------------------
                                           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] 4+ messages in thread

end of thread, other threads:[~2014-10-14 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-26 11:45 Strange error with bookmarks Michał Goliński
2014-08-29 20:07 ` Hans Hagen
2014-10-14 11:41   ` Michał Goliński
2014-10-14 14:58     ` 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).