[NTG-context] Custom list layout with PDF bookmarks

Bruce Horrocks ntg at scorecrow.com
Sat May 16 00:47:45 CEST 2020


When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow?

Example:

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

\define[3]\SectionListEntry
  {\par \leftaligned\bgroup
     \hbox to 2em{#3}%
         \hskip   1em
         \vtop{\hsize\dimexpr\textwidth-3em\relax#2}
  \egroup \par}

% Comment out this next line to regain section hyperlinks in the ToC
\setuplist[section][alternative=command,command=\SectionListEntry]

\starttext
Table of Contents
\placecontent[criterium=all]
\placebookmarks[chapter,subject]

\chapter{Tufte}
\section{Section 1}
\input tufte
\page
\section{Section 2}
\input tufte
\page
\section{Section 3}
\input tufte
\page
\stoptext


Thanks in advance.
--
Bruce Horrocks
Hampshire, UK



More information about the ntg-context mailing list