From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
Henning Hraban Ramm <texml@fiee.net>
Subject: Re: page interaction in contents list entry
Date: Thu, 20 Sep 2018 17:26:26 +0200 [thread overview]
Message-ID: <6a2f56a1-9ebb-ac84-c6bd-881605471fcb@gmail.com> (raw)
In-Reply-To: <A75C3D14-C9FB-45A8-B116-08840C560A86@fiee.net>
\setupinteraction[state=start]
\define[3]\ChapterTocEntry
{\maxaligned{#2\hfill#3}}
\setuplist
[chapter]
[alternative=interactive,
before=\endgraf,
after=\endgraf,
command=\ChapterTocEntry]
\usemodule[visual]
\starttext
\placelist[chapter][criterium=all]
\dorecurse{5}{
\chapter{\fakewords{2}{7}}
\dorecurse{5}{
\fakewords{10}{300}\par
}
}
\stoptext
Wolfgang
Henning Hraban Ramm schrieb am 20.09.18 um 11:25:
> Still the same problem:
> I can’t get a page link in my custom ToC.
> What’s wrong?
>
> ----- >8 -----
> \setupinteraction[state=start]
>
> \define[3]\ChapterTocEntry{%
> % #1-3 is not used, #1/2 are empty, #3 is page number
> \currentlistentrytitle\hfill%
> %%% goto doesn’t create a link here:
> {\goto{\currentlistentrypagenumber}[page(\currentlistentrypagenumber)]}
> %%%
> %\at{}[\structurelistvariable{reference}]
> % #3 = \currentlistentrypagenumber
> \par
> }
>
> \setuplist[chapter][%
> alternative=command,
> interaction=pagenumber,
> textcolor=black,
> before=,
> inbetween=,
> after=,
> command=\ChapterTocEntry,
> ]
>
> \usemodule[visual]
>
> \starttext
>
> \placelist[chapter][criterium=all]
>
> \dorecurse{5}{
> \chapter{\fakewords{2}{7}}
> \dorecurse{5}{
> \fakewords{10}{300}\par
> }
> }
>
> \stoptext
> ----- 8< -----
>
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
>
> Am 2018-07-26 um 16:22 schrieb Henning Hraban Ramm <texml@fiee.net>:
>
>> Am 2018-07-23 um 13:06 schrieb Henning Hraban Ramm <texml@fiee.net>:
>>
>>> Dear wizards,
>>>
>>> in a list command (i.e. \setuplist[command=\MyCmd]) I use \currentlistentrypagenumber to show the page number.
>>> Now I’d like to make this a link, like in a normal ToC. I didn’t find a suitable command. Is there one?
>> From the sources (strc-ref.mkvi) it looks like
>> \goto{\currentlistentrypagenumber}[page(\currentlistentrypagenumber)]
>> should do the trick.
>> It does show the right page number, but doesn’t make it a link.
>> While
>> \goto{something}{page(30)}
>> works; i.e. it creates a link to page 30 of the PDF, even if the displayed page number (user page?) is different.
>>
>> Is this an expansion problem?
>>
>> Greetlings, Hraban
>> ---
>> https://www.fiee.net
>> http://wiki.contextgarden.net
>> https://www.dreiviertelhaus.de
>> GPG Key ID 1C9B22FD
>>
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2018-09-20 15:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 11:06 Henning Hraban Ramm
2018-07-26 14:22 ` Henning Hraban Ramm
2018-09-20 9:25 ` Henning Hraban Ramm
2018-09-20 15:26 ` Wolfgang Schuster [this message]
2018-09-20 19:51 ` Henning Hraban Ramm
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=6a2f56a1-9ebb-ac84-c6bd-881605471fcb@gmail.com \
--to=wolfgang.schuster.lists@gmail.com \
--cc=ntg-context@ntg.nl \
--cc=texml@fiee.net \
/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).