On Wed, 2006-08-16 at 21:46 +0200, Mojca Miklavec wrote:
> My guess is that \doifnunmberelse won't work since it's not only the
> number hidden there, but also formatting, conversion, ... etc.

You're probably right.

> But I have no idea how to do it in some other way. You may take a look
> at the following, but it has the side-effect that it will not only be
> used in TOC, but also in text which is most probably not what you
> want:

Unfortunately, your solution didn't work for me. It did, however, get me
thinking in the right direction. In case anyone is every crazy enough to
follow the same path, here's a much more simple solution that doesn't
even need \doifnumberelse:

-----

\definehead[appendix][chapter]
\def\myappendixlistnumber#1{\vbox{Appendix #1\crlf}}
\def\mychapterlistnumber#1{\vbox{Chapter #1\crlf}}
\def\mysectionlistnumber#1{\emspace\emspace}
\def\mysectionlisttext#1{%
  \doifelse{#1}{Lab Tasks}{\hskip-1em\bf#1\hfilll}{#1}}
\setuplist[appendix][width=1em,numberstyle=bold,%
  numbercommand=\myappendixlistnumber,textstyle=bold]
\setuplist[chapter][width=1em,numberstyle=bold,%
  numbercommand=\mychapterlistnumber,textstyle=bold]
\setuplist[section][width=2em,numbercommand=\mysectionlistnumber,%
  textcommand=\mysectionlisttext]

\starttext
\bgroup{}Table of Contents\egroup\par
\startcolumns[n=2,distance=.3in,balance=no]
\bgroup
\placelist[chapter,appendix,section][criterium=all,alternative=b]
\egroup
\stopcolumns
\page
\chapter{Foo}
\section{Bar}
\input knuth
\writetolist[section]{}{Lab Tasks}
\input douglas
\section{Baz}
\startappendices
\appendix{Corge}
\section{Grault}
\input zapf
\stopappendices
\stoptext

-----

-- 
Stuart Jansen <[EMAIL PROTECTED]>
Guru Labs, L.C.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to