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
___________________________________________________________________________________

Reply via email to