From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30332 Path: news.gmane.org!not-for-mail From: Stuart Jansen Newsgroups: gmane.comp.tex.context Subject: using \doifnumberelse in a ToC numbercommand= Date: Wed, 16 Aug 2006 12:48:59 -0600 Organization: Guru Labs, L.C. Message-ID: <1155754139.3406.14.camel@vision.buscaluz.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0816410009==" X-Trace: sea.gmane.org 1155754194 639 80.91.229.2 (16 Aug 2006 18:49:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2006 18:49:54 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 16 20:49:52 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 1GDQSb-00053j-S7 for gctc-ntg-context-518@m.gmane.org; Wed, 16 Aug 2006 20:49:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DFE491FE64; Wed, 16 Aug 2006 20:49:48 +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 13112-03-2; Wed, 16 Aug 2006 20:49:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 451D21FE48; Wed, 16 Aug 2006 20:49:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6FA841FE48 for ; Wed, 16 Aug 2006 20:49:41 +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 13112-03 for ; Wed, 16 Aug 2006 20:49:37 +0200 (CEST) Original-Received: from mail.gurulabs.com (mail.gurulabs.com [67.137.148.7]) by ronja.ntg.nl (Postfix) with SMTP id 6AF551FE33 for ; Wed, 16 Aug 2006 20:49:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by mail.gurulabs.com (Postfix) with ESMTP id 546C214C266 for ; Wed, 16 Aug 2006 12:49:00 -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 xjVYO2tTtHhI for ; Wed, 16 Aug 2006 12:48:59 -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 12:48:59 -0600 (MDT) Original-To: mailing list for ConTeXt users 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:30332 Archived-At: --===============0816410009== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ftPVfcP0rW6+oVPdlMD8" --=-ftPVfcP0rW6+oVPdlMD8 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I asked this question a couple of days ago, but didn't get any takers. I don't want to be a pest, but it's frustrating to be so close yet unable to solve this final problem. Let's see if rephrasing the question helps. I'm trying to use \doifnumberelse in a \setuplist numbercommand=3D but it isn't working. The simplified example below shows the very specific table of contents layout I'm trying to accomplish. You will note that both the chapter number and the appendix letter are labeled with "Appendix" when in fact I want the chapter to be labeled "Chapter". Does anyone know either (a) how to get \doifnumberelse to work in this situation or (b) if there's a better way I should have done this instead. ----- \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=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,section][criterium=3Dall,alternative=3Db] \egroup \stopcolumns \page \chapter{Foo} \section{Bar} \input knuth \startappendices \chapter{Corge} \section{Grault} \input zapf \stopappendices \stoptext ----- --=20 Stuart Jansen Guru Labs, L.C. --=-ftPVfcP0rW6+oVPdlMD8 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) iD8DBQBE42ibwTOJ4P81PNARAozbAJ9OOYYLBNHkXDP/br05cfjNjxfsngCcCz6d MjmhB4QdpmpXKmseH7CSp0Y= =a8R7 -----END PGP SIGNATURE----- --=-ftPVfcP0rW6+oVPdlMD8-- --===============0816410009== 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 --===============0816410009==--