From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Willi Egger <context@boede.nl>
Subject: Re: alternative command for lists
Date: Fri, 03 Aug 2012 13:05:26 +0200 [thread overview]
Message-ID: <501BB076.4000301@wxs.nl> (raw)
In-Reply-To: <811E378A-D090-448D-A4AA-9F0E22DF6C74@boede.nl>
On 3-8-2012 12:00, Willi Egger wrote:
> Hi all,
>
> At the moment I am busy to build a custom TOC. I stumble overt the fact, that ConTeXt seems to forget all parameters set in \setuplist once you issue alternative=command, command=…
>
> Could anyone of you enlighten me whether I miss something?
>
> Kind regards
>
> Willi
>
> P.S. Please refer to the attached minimal example.
indeed command is pretty basic ... btw, this is the future:
% there will be some helpers
\unprotect
\def\listboxproperties {\strc_lists_get_reference_attribute}
\def\listrenderingsetup {\the\t_lists_every_renderingtext}
\def\listrenderingsynchronize{\the\t_lists_every_renderingsynchronize}
\protect
% now you can say:
\definelistalternative
[willi:1]
[renderingsetup=willi:1]
\startsetups[willi:1]
\listparameter{before}
\vbox \listboxproperties{all} {
\forgetall
\dontleavehmode
\listrenderingsynchronize
\bgroup
\useliststyleandcolor{pagestyle}{pagecolor}
\currentlistentrypagenumber
\egroup
\hskip3em
\bgroup
\useliststyleandcolor{numberstyle}{numbercolor}
\currentlistsymbol
\egroup
.\space
\bgroup
\useliststyleandcolor{textstyle}{textcolor}
\currentlistentrytitle
\egroup
\par
}
\par
\listparameter{after}
\stopsetups
\setuplist
[section]
[before={\blank[line]},
after=,
style=\bf,
numberstyle=\bf,
textstyle=\bs,
prefix=no,
alternative=willi:1]
so, you *do* have access to \listparameter as well as
\listrenderingparameter
the main tricky thing to keep in mind is the interation related
properties and some synchronization
-----------------------------------------------------------------
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
___________________________________________________________________________________
prev parent reply other threads:[~2012-08-03 11:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 10:00 Willi Egger
2012-08-03 10:25 ` luigi scarso
2012-08-03 11:05 ` Hans Hagen [this message]
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=501BB076.4000301@wxs.nl \
--to=pragma@wxs.nl \
--cc=context@boede.nl \
--cc=ntg-context@ntg.nl \
/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).