On 11/8/2012 12:06 PM, Hans Hagen wrote:
On 11/8/2012 11:06 AM, Marco Patzer wrote:
2012-11-08 Wolfgang Schuster:

Hi Wolfgang!

\startsetups [headlist]
   \framed[align=normal, frame=off]
     {\placelist [chapter] [alternative=highlight, criterium=all]}
\stopsetups

\definelistalternative
   [highlight]
   [renderingsetup=list:highlight]

I like the flexibility of renderingsetups for \defineheadalternative,
but frankly, I didn't know they can be used for lists as well and
I was clueless about the best place to hook into.

\startsetups [list:highlight]
   \par
   \startlinealignment[middle]
     \doifelse{\fetchmark[chapter][first]}{\currentlistentrytitle}

%\doifelse{\fetchmark[chapter][first]}{\ctxcommand{listtitle("\currentlist",\currentlistindex)}}

       {\color[red] {\currentlistentrytitle}}
       {\color[blue]{\currentlistentrytitle}}
   \stoplinealignment
   \par
\stopsetups

That's a neat and clean solution. Thanks Wolfgang.

the next beta has: \namedstructureheadlocation{name}

so that you can compare

  \currentlistentrylocation

with

  \namedstructureheadlocation{chapter}

(todo: also store locations elsewhere?)

Best document this before we forget about it.

Hans

-----------------------------------------------------------------
                                          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
___________________________________________________________________________________

Reply via email to