[NTG-context] using \doifnumberelse in a ToC numbercommand=

Stuart Jansen sjansen at gurulabs.com
Wed Aug 16 22:28:19 CEST 2006

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:


\def\myappendixlistnumber#1{\vbox{Appendix #1\crlf}}
\def\mychapterlistnumber#1{\vbox{Chapter #1\crlf}}
  \doifelse{#1}{Lab Tasks}{\hskip-1em\bf#1\hfilll}{#1}}

\bgroup{}Table of Contents\egroup\par
\input knuth
\writetolist[section]{}{Lab Tasks}
\input douglas
\input zapf


Stuart Jansen <sjansen at gurulabs.com>
Guru Labs, L.C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20060816/9b9e15f1/attachment.bin 

More information about the ntg-context mailing list