At 03:19 PM 12/1/2001 -0500, F. Miller Maley wrote:
>Suppose that in an interactive document, I would like to have a local
>table of contents (e.g. \placelist[section]) on each page, but I would
>like the current portion (e.g. section) to be highlighted in some way,
>perhaps by style or color, within the list. What mechanisms are needed
>to achieve this?
>
>I can envision doing it by somehow extracting mark information and list
>information into control sequences and comparing them with \ifx. However,
>I usually find that whatever I want to do, ConTeXt already has a way of doing!
Well, it's not a feature, but since the info is available, i can imagine
something like this:
Say that I patch a macro :
\unprotected \def\dolijstelement#1#2#3#4#5#6% pas op: wordt ook elders
gedefinieerd
{\doiftoclevelelse[#5]
{\def\currentlist{#1}%
\ifundefined{\??li\currentlist\c!huidige}\else
\doif{#3}\currentheadnumber
{\edef\currentlist{\getvalue{\??li\currentlist\c!huidige}}}%
\fi
\dodolijstelement\currentlist{#2}{#3}{#4}{#5}{#6}}
{}}
(this assumes a version where \currentheadnumber is known)
now we can define a fake list (since i can imagine that you want to set up
some layout characteristics)
\definelist [fakesection] [section]
\setuplist [fakesection] [before=\blank,after=\blank,color=green]
\setuplist [section] [current=fakesection]
\setupcolors[state=start]\setupinteraction[state=start]
\starttext
\chapter{test}
\section{test}
\section{test}
\section{test}
\placelist[section][criterium=previous]
\section{test}
\section{test}
\stoptext
We can have a vote for adding this feature -)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------