I'm trying to achieve a specific table of contents layout. The problem
I'm running into is adding the word "Chapter" before the chapter number
and "Appendix" before the appendix letter. Below is what I've
accomplished so far, any tips would be greatly appreciated.
-----
\def\mychapterlistnumber#1{\vbox{%
\doifnumberelse{#1}{Chapter}{Appendix} #1\crlf}}
\def\mysectionlistnumber#1{\emspace\emspace}
\def\mysectionlisttext#1{%
\doifelse{#1}{Lab Tasks}{\hskip-1em\bf#1\hfilll}{#1}}
\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,section][criterium=all,alternative=b]
\egroup
\stopcolumns
\page
\chapter{Foo}
\section{Bar}
\input knuth
\startappendices
\chapter{Corge}
\section{Grault}
\input knuth
\stopappendices
\stoptext
-----
--
Stuart Jansen