From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30338 Path: news.gmane.org!not-for-mail From: Stuart Jansen Newsgroups: gmane.comp.tex.context Subject: Re: using \doifnumberelse in a ToC numbercommand= Date: Wed, 16 Aug 2006 14:28:19 -0600 Organization: Guru Labs, L.C. Message-ID: <1155760099.3406.17.camel@vision.buscaluz.org> References: <1155754139.3406.14.camel@vision.buscaluz.org> <6faad9f00608161246l2cd68086w90dbc84721692795@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1902209791==" X-Trace: sea.gmane.org 1155760135 21335 80.91.229.2 (16 Aug 2006 20:28:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2006 20:28:55 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 16 22:28:48 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GDS0A-0000Jf-N8 for gctc-ntg-context-518@m.gmane.org; Wed, 16 Aug 2006 22:28:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3C0FF1FE77; Wed, 16 Aug 2006 22:28:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14364-03; Wed, 16 Aug 2006 22:28:27 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C9EDC1FE48; Wed, 16 Aug 2006 22:28:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2CF7C1FE48 for ; Wed, 16 Aug 2006 22:28:25 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14178-09 for ; Wed, 16 Aug 2006 22:28:22 +0200 (CEST) Original-Received: from mail.gurulabs.com (mail.gurulabs.com [67.137.148.7]) by ronja.ntg.nl (Postfix) with SMTP id E24221FE39 for ; Wed, 16 Aug 2006 22:28:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by mail.gurulabs.com (Postfix) with ESMTP id F05F914C28F for ; Wed, 16 Aug 2006 14:28:20 -0600 (MDT) X-Virus-Scanned: amavisd-new at gurulabs.com Original-Received: from mail.gurulabs.com ([127.0.0.1]) by localhost (mail.gurulabs.com [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id KvhDDzGO3PmJ for ; Wed, 16 Aug 2006 14:28:20 -0600 (MDT) Original-Received: from station128.example.com (server1-class1.gurulabs.com [10.70.1.2]) by mail.gurulabs.com (Postfix) with ESMTP for ; Wed, 16 Aug 2006 14:28:20 -0600 (MDT) Original-To: mailing list for ConTeXt users In-Reply-To: <6faad9f00608161246l2cd68086w90dbc84721692795@mail.gmail.com> X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30338 Archived-At: --===============1902209791== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Xq0DmCV2nOq036iVUTT7" --=-Xq0DmCV2nOq036iVUTT7 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=3D1em,numberstyle=3Dbold,% numbercommand=3D\myappendixlistnumber,textstyle=3Dbold] \setuplist[chapter][width=3D1em,numberstyle=3Dbold,% numbercommand=3D\mychapterlistnumber,textstyle=3Dbold] \setuplist[section][width=3D2em,numbercommand=3D\mysectionlistnumber,% textcommand=3D\mysectionlisttext] \starttext \bgroup{}Table of Contents\egroup\par \startcolumns[n=3D2,distance=3D.3in,balance=3Dno] \bgroup \placelist[chapter,appendix,section][criterium=3Dall,alternative=3Db] \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 ----- --=20 Stuart Jansen Guru Labs, L.C. --=-Xq0DmCV2nOq036iVUTT7 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBE43/jwTOJ4P81PNARAo9gAJ0WX05Wb9draVEjqn0Cc2JtawsqHwCfbpXf qMMmytP6JwdvkBS91UEDcm4= =VOMA -----END PGP SIGNATURE----- --=-Xq0DmCV2nOq036iVUTT7-- --===============1902209791== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============1902209791==--