ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Bruce Horrocks <ntg@scorecrow.com>
Subject: Re: Custom list layout with PDF bookmarks
Date: Sat, 16 May 2020 08:30:48 +0200	[thread overview]
Message-ID: <e8f17d27-3f67-66a4-b24e-3cf433de69fc@gmail.com> (raw)
In-Reply-To: <093CE8F2-A5C4-4651-876C-3299F4130602@scorecrow.com>

Bruce Horrocks schrieb am 16.05.2020 um 00:47:
> 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]

alternative=command : Cutsom TOC without hyperlinks

alternative=interactive : Custom TOC with hyperlinks

%%%% begin example
\define[3]\SectionListEntry
   {\hbox\bgroup
      \hbox to 2em{#1}%
      \hfill
      \vtop{\hsize\dimexpr\textwidth-3em\relax#2}%
    \egroup}

\setuplist
   [section]
   [alternative=interactive,
        command=\SectionListEntry,
         before=\endgraf,
          after=\endgraf]
%%%% end example

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2020-05-16  6:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 22:47 Bruce Horrocks
2020-05-16  6:15 ` Henning Hraban Ramm
2020-05-16  6:30 ` Wolfgang Schuster [this message]
2020-05-16 11:02   ` Henning Hraban Ramm
2020-05-17 11:38     ` Bruce Horrocks
2020-05-17 19:40       ` Henning Hraban Ramm
2020-05-17 11:47     ` Problem with \vfill in extreme table Bruce Horrocks
2020-05-17 15:00       ` Wolfgang Schuster
2020-05-17 19:56         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8f17d27-3f67-66a4-b24e-3cf433de69fc@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=ntg@scorecrow.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).