ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* PDF bookmarks - incorrect titles for registers
@ 2013-11-18 20:43 Jan Tosovsky
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Tosovsky @ 2013-11-18 20:43 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Dear All,

when I specify custom titles for my registers, they are ignored in
bookmarks:

\setupinteraction[state=start]
\placebookmarks[chapter]
\setupinteractionscreen[option=bookmark]

\defineregister[indexname][indexnames]
\defineregister[indexsubject][indexsubjects]
\setupheadtext[indexname=Name Index]
\setupheadtext[indexsubject=Subject Index]

\starttext
\completecontent
\chapter{Chapter}text\indexname{primary}\indexsubject{primary}
\startbackmatter
\completeindexname
\completeindexsubject
\stopbackmatter
\stoptext

Is it necessary to switch something else on?

Thanks, Jan

ConTeXt 2013.11.14 & Win 7

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

* Re: PDF bookmarks - incorrect titles for registers
  2013-11-26 19:11   ` Hans Hagen
  2013-11-26 19:30     ` Jan Tosovsky
       [not found]     ` <005401ceeadd$e83e6bc0$b8bb4340$@tosovsky@email.cz>
@ 2013-11-26 22:23     ` Hans Hagen
  2 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2013-11-26 22:23 UTC (permalink / raw)
  To: ntg-context

On 11/26/2013 8:11 PM, Hans Hagen wrote:

> as titles can be anything and bookmarks are limited, we need to have
> some protection in place ... unexpandable macros are simply dropped so
> \labeltext{index} becomes index

btw, using \complete... is just a compatibility command, if you use a 
normal title + \place... you have no such problems and the effort 
involved in adding two commands instead of one is neglectable on a document

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

* Re: PDF bookmarks - incorrect titles for registers
       [not found]     ` <005401ceeadd$e83e6bc0$b8bb4340$@tosovsky@email.cz>
@ 2013-11-26 22:13       ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2013-11-26 22:13 UTC (permalink / raw)
  To: ntg-context

On 11/26/2013 8:30 PM, Jan Tosovsky wrote:

> Thanks for this detailed explanation. If I understand correctly, this switch
> is intentional and won't be applied automatically even for registers or
> other peculiar cases where title is specified differently/unexpectedly.

the bookmark setting defaults to the title itself but you can always set 
a bookmark title explicitly with bookmark=

>>> When it is added to the beginning of my example, it returns an error:
>>> attempt to call field 'boxtostring' (a nil value)
>>
>> ah, only in my experimental tree, i'll add it to the beta
>
> Thanks, but this one is not so urgent.

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

* Re: PDF bookmarks - incorrect titles for registers
  2013-11-26 19:11   ` Hans Hagen
@ 2013-11-26 19:30     ` Jan Tosovsky
       [not found]     ` <005401ceeadd$e83e6bc0$b8bb4340$@tosovsky@email.cz>
  2013-11-26 22:23     ` Hans Hagen
  2 siblings, 0 replies; 6+ messages in thread
From: Jan Tosovsky @ 2013-11-26 19:30 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2013-11-26 Hans Hagen wrote:
> On 11/26/2013 8:03 PM, Jan Tosovsky wrote:
> > On 2013-11-18 Jan Tosovsky wrote:
> >>
> >> when I specify custom titles for my registers, they are ignored in
> >> bookmarks:
> >>
> >> \setupinteraction[state=start]
> >> \placebookmarks[chapter]
> >> \setupinteractionscreen[option=bookmark]
> >>
> >> \defineregister[indexname][indexnames]
> >> \defineregister[indexsubject][indexsubjects]
> >> \setupheadtext[indexname=Name Index]
> >> \setupheadtext[indexsubject=Subject Index]
> >>
> >> \starttext
> >> \completecontent
> >> \chapter{Chapter}text\indexname{primary}\indexsubject{primary}
> >> \startbackmatter
> >> \completeindexname
> >> \completeindexsubject
> >> \stopbackmatter
> >> \stoptext
> >>
> >> Is it necessary to switch something else on?
> >
> > According to the proposed solution at
> > http://tracker.luatex.org/view.php?id=865
> >
> > it can be switched on using this magic formula
> > \enabledirectives[references.bookmarks.preroll]
> >
> > What is the correct usage of this? And are there any details why it
> > is required and what exactly it does?
> 
> as titles can be anything and bookmarks are limited, we need to have
> some protection in place ... unexpandable macros are simply dropped so
> \labeltext{index} becomes index
>
> by default the title is set to a label which is not expandable
> 
> the directive will convert the typeset title into a bookmark
>

Thanks for this detailed explanation. If I understand correctly, this switch
is intentional and won't be applied automatically even for registers or
other peculiar cases where title is specified differently/unexpectedly.

> > When it is added to the beginning of my example, it returns an error:
> > attempt to call field 'boxtostring' (a nil value)
> 
> ah, only in my experimental tree, i'll add it to the beta

Thanks, but this one is not so urgent.

Jan

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

* Re: PDF bookmarks - incorrect titles for registers
       [not found] ` <005201ceeada$39d53fd0$ad7fbf70$@tosovsky@email.cz>
@ 2013-11-26 19:11   ` Hans Hagen
  2013-11-26 19:30     ` Jan Tosovsky
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Hans Hagen @ 2013-11-26 19:11 UTC (permalink / raw)
  To: ntg-context

On 11/26/2013 8:03 PM, Jan Tosovsky wrote:
> On 2013-11-18 Jan Tosovsky wrote:
>>
>> when I specify custom titles for my registers, they are ignored in
>> bookmarks:
>>
>> \setupinteraction[state=start]
>> \placebookmarks[chapter]
>> \setupinteractionscreen[option=bookmark]
>>
>> \defineregister[indexname][indexnames]
>> \defineregister[indexsubject][indexsubjects]
>> \setupheadtext[indexname=Name Index]
>> \setupheadtext[indexsubject=Subject Index]
>>
>> \starttext
>> \completecontent
>> \chapter{Chapter}text\indexname{primary}\indexsubject{primary}
>> \startbackmatter
>> \completeindexname
>> \completeindexsubject
>> \stopbackmatter
>> \stoptext
>>
>> Is it necessary to switch something else on?
>
> According to the proposed solution at
> http://tracker.luatex.org/view.php?id=865
>
> it can be switched on using this magic formula
> \enabledirectives[references.bookmarks.preroll]
>
> What is the correct usage of this? And are there any details why it is
> required and what exactly it does?

by default the title is set to a label which is not expandable

the directive will convert the typeset title into a bookmark

> When it is added to the beginning of my example, it returns an error:
> attempt to call field 'boxtostring' (a nil value)

ah, only in my experimental tree, i'll add it to the beta

> But to be honest, I'd expect setting this flag internally by default as I
> cannot imagine any use case where the index ID should be preferred in favor
> of the title...

as titles can be anything and bookmarks are limited, we need to have 
some protection in place ... unexpandable macros are simply dropped so 
\labeltext{index} becomes index

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

* Re: PDF bookmarks - incorrect titles for registers
       [not found] <00f801cee49e$c9521ad0$5bf65070$@tosovsky@email.cz>
@ 2013-11-26 19:03 ` Jan Tosovsky
       [not found] ` <005201ceeada$39d53fd0$ad7fbf70$@tosovsky@email.cz>
  1 sibling, 0 replies; 6+ messages in thread
From: Jan Tosovsky @ 2013-11-26 19:03 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2013-11-18 Jan Tosovsky wrote:
> 
> when I specify custom titles for my registers, they are ignored in
> bookmarks:
> 
> \setupinteraction[state=start]
> \placebookmarks[chapter]
> \setupinteractionscreen[option=bookmark]
> 
> \defineregister[indexname][indexnames]
> \defineregister[indexsubject][indexsubjects]
> \setupheadtext[indexname=Name Index]
> \setupheadtext[indexsubject=Subject Index]
> 
> \starttext
> \completecontent
> \chapter{Chapter}text\indexname{primary}\indexsubject{primary}
> \startbackmatter
> \completeindexname
> \completeindexsubject
> \stopbackmatter
> \stoptext
> 
> Is it necessary to switch something else on?

According to the proposed solution at
http://tracker.luatex.org/view.php?id=865

it can be switched on using this magic formula
\enabledirectives[references.bookmarks.preroll]

What is the correct usage of this? And are there any details why it is
required and what exactly it does?

When it is added to the beginning of my example, it returns an error:
attempt to call field 'boxtostring' (a nil value)

But to be honest, I'd expect setting this flag internally by default as I
cannot imagine any use case where the index ID should be preferred in favor
of the title...

Jan

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

end of thread, other threads:[~2013-11-26 22:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 20:43 PDF bookmarks - incorrect titles for registers Jan Tosovsky
     [not found] <00f801cee49e$c9521ad0$5bf65070$@tosovsky@email.cz>
2013-11-26 19:03 ` Jan Tosovsky
     [not found] ` <005201ceeada$39d53fd0$ad7fbf70$@tosovsky@email.cz>
2013-11-26 19:11   ` Hans Hagen
2013-11-26 19:30     ` Jan Tosovsky
     [not found]     ` <005401ceeadd$e83e6bc0$b8bb4340$@tosovsky@email.cz>
2013-11-26 22:13       ` Hans Hagen
2013-11-26 22:23     ` 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).