ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* PDF Bookmarks on unnumbered subjects/titles etc
@ 2007-12-11 21:08 mir_ctx
  2007-12-12 14:09 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: mir_ctx @ 2007-12-11 21:08 UTC (permalink / raw)
  To: ntg-context

Has anyone managed to get ConTeXt to generate PDF bookmarks for
the unnumbered headings such as \title, \subject, etc?

I saw the examples on the wiki page but unfortunately they
did nothing.

http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers

\setupinteraction[state=start]
\placebookmarks[chapter]
\setupinteractionscreen[option=bookmark]
\starttext
\chapter{some chapter}
\bookmark{a title}
some text
\stoptext

The above example correctly generates bookmarks in the PDF.

I can't, however, get the same thing to work when using
\subject. Even explicitly placing bookmarks with \bookmark
doesn't work:

\setupinteraction[state=start]
\placebookmarks[chapter] % didn't add subject here as the wiki
                         % says it doesn't work, and it's correct
\setupinteractionscreen[option=bookmark]
\starttext
\subject{some chapter}
\bookmark{a title}
some text
\stoptext

The wiki page also has this:

\definehead[Title][Chapter]
\setuphead[Title][number=no]

But that doesn't make the slightest difference.

Anybody got any ideas how to get this to work? I'm using:

pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
context : ver: 2005.01.31
cont-en : ver: 2005.01.31 fmt: 2007.5.21 mes: english

Apologies if my replies to this list are apparently nonexistent.
So far it seems as if most of them have bounced with a strange
"unrouteable address" error.
-- 
  
  mir_ctx@imap.cc

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: PDF Bookmarks on unnumbered subjects/titles etc
  2007-12-11 21:08 PDF Bookmarks on unnumbered subjects/titles etc mir_ctx
@ 2007-12-12 14:09 ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2007-12-12 14:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/12/11, mir_ctx@imap.cc <mir_ctx@imap.cc>:
> Has anyone managed to get ConTeXt to generate PDF bookmarks for
> the unnumbered headings such as \title, \subject, etc?
>
> I saw the examples on the wiki page but unfortunately they
> did nothing.
>
> http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers
>
> \setupinteraction[state=start]
> \placebookmarks[chapter]
> \setupinteractionscreen[option=bookmark]
> \starttext
> \chapter{some chapter}
> \bookmark{a title}
> some text
> \stoptext
>
> The above example correctly generates bookmarks in the PDF.
>
> I can't, however, get the same thing to work when using
> \subject. Even explicitly placing bookmarks with \bookmark
> doesn't work:
>
> \setupinteraction[state=start]
> \placebookmarks[chapter] % didn't add subject here as the wiki
>                          % says it doesn't work, and it's correct
> \setupinteractionscreen[option=bookmark]
> \starttext
> \subject{some chapter}
> \bookmark{a title}
> some text
> \stoptext

You can to play with the following code, I don't know why it produce multiple
bookmark entries and even more with text between the headers but it's funny.

\setupinteraction[state=start]
\def\sectionbookmark#1{\bookmark[section]{#1}#1}
\def\subjectbookmark#1{\bookmark[subject]{#1}#1}
\setuphead[section][deeptextcommand=\sectionbookmark]
\setuphead[subject][deeptextcommand=\subjectbookmark]
\placebookmarks[chapter,section,subject]
\setupinteractionscreen[option=bookmark]
\starttext
\chapter{Chapter}
\section{Section}
\subject{Subject}
\section{Another section}
\chapter{Second Chapter}
text
\section{First section in second chapter}
text
\subject{Another Subject}
text
\section{Last section}
text
\stoptext

> The wiki page also has this:
>
> \definehead[Title][Chapter]
> \setuphead[Title][number=no]
>
> But that doesn't make the slightest difference.
>
> Anybody got any ideas how to get this to work? I'm using:
>
> pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
> TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
> texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
> tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
> context : ver: 2005.01.31
> cont-en : ver: 2005.01.31 fmt: 2007.5.21 mes: english

You ConTeXt is ancient and you should update to the current version.

> Apologies if my replies to this list are apparently nonexistent.
> So far it seems as if most of them have bounced with a strange
> "unrouteable address" error.

Wolfgang
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: PDF Bookmarks on unnumbered subjects/titles etc
@ 2011-01-09 15:09 Florian Wobbe
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Wobbe @ 2011-01-09 15:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Wolfgang,

3 years ago, you wrote:

>> [...]
>> \setupinteraction[state=start]
>> \placebookmarks[chapter]
>> \setupinteractionscreen[option=bookmark]
>> \starttext
>> \chapter{some chapter}
>> \bookmark{a title}
>> some text
>> \stoptext
>>
>> The above example correctly generates bookmarks in the PDF.
>>
>> I can't, however, get the same thing to work when using
>> \subject. [...]
>
>You can to play with the following code, I don't know why it produce multiple
>bookmark entries and even more with text between the headers but it's funny.
>
>\setupinteraction[state=start]
>\def\sectionbookmark#1{\bookmark[section]{#1}#1}
>\def\subjectbookmark#1{\bookmark[subject]{#1}#1}
>\setuphead[section][deeptextcommand=\sectionbookmark]
>\setuphead[subject][deeptextcommand=\subjectbookmark]
>\placebookmarks[chapter,section,subject]
>\setupinteractionscreen[option=bookmark]
>\starttext
>\chapter{Chapter}
>\section{Section}
>\subject{Subject}
>\section{Another section}
>\chapter{Second Chapter}
>text
>\section{First section in second chapter}
>text
>\subject{Another Subject}
>text
>\section{Last section}
>text
>\stoptext

This minimal example gives me an error. Are there other/better means to achieve the same thing today?

Best,
Florian

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

end of thread, other threads:[~2011-01-09 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-11 21:08 PDF Bookmarks on unnumbered subjects/titles etc mir_ctx
2007-12-12 14:09 ` Wolfgang Schuster
2011-01-09 15:09 Florian Wobbe

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