From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40765 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?No=E9_Cuneo?= Newsgroups: gmane.comp.tex.context Subject: Table of contents customization Date: Tue, 29 Apr 2008 11:23:05 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1209461076 27749 80.91.229.12 (29 Apr 2008 09:24:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Apr 2008 09:24:36 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 29 11:25:13 2008 connect(): Connection refused 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 lo.gmane.org with esmtp (Exim 4.50) id 1Jqm5I-0005iA-1A for gctc-ntg-context-518@m.gmane.org; Tue, 29 Apr 2008 11:25:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0A6D01FBC9; Tue, 29 Apr 2008 11:24:29 +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 32247-01-3; Tue, 29 Apr 2008 11:23:45 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E41CA1FB8F; Tue, 29 Apr 2008 11:23:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9D3771FB8E for ; Tue, 29 Apr 2008 11:23:42 +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 32247-01-2 for ; Tue, 29 Apr 2008 11:23:06 +0200 (CEST) Original-Received: from out3.laposte.net (out4.laposte.net [193.251.214.121]) by ronja.ntg.nl (Postfix) with ESMTP id 9C72B1FBB8 for ; Tue, 29 Apr 2008 11:23:06 +0200 (CEST) Original-Received: from meplus.info (localhost [127.0.0.1]) by mwinf8302.laposte.net (SMTP Server) with ESMTP id 386F7700008C for ; Tue, 29 Apr 2008 11:23:06 +0200 (CEST) Original-Received: from vpn-epfl-c023.epfl.ch (vpn-epfl-c023.epfl.ch [128.178.184.33]) by mwinf8302.laposte.net (SMTP Server) with ESMTP id 213E27000085 for ; Tue, 29 Apr 2008 11:23:05 +0200 (CEST) X-ME-UUID: 20080429092306136.213E27000085@mwinf8302.laposte.net X-Mailer: Apple Mail (2.919.2) X-me-spamlevel: not-spam X-me-spamrating: 31.879062 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:40765 Archived-At: Hi all, I've been using ConTeXT for quite a while now, and I am trying to build my own customized environnment. I have some trouble customizing my content table. I tried everything I could, including reading the manual twice over, and I still can't figure out why none of my ideas will work! In fact, my configuration looks like this: \setupcombinedlist[content][level=4,alternative=c] \setuplist[chapter][width=7mm,style=bold] \setuplist[section][width=10mm,margin=10mm] \setuplist[subsection] [width=13mm,style=slanted,pagestyle=normal,margin=21mm] What I would like is the number to be separated from the page name by a ".", which would give something like: 1. Chapter name................. 32 I tried \setupcombinedlist[content][level=4,alternative=c, separator={.}], but it doesn't work. Although 'separator' is documented as the separator between the number and the pagename, it appears to be the separator between the number and subnumbers, like, with separator={ppp}: 1 MyChapter ............ 1ppp1 Mysection.......... Which is not quite what I expect! So i tried setting something like \def\mycommand#1{#1.} \setupcombinedlist[content][level=4,alternative=c, numbercommand={\mycommand}] Which works, except for the fact that when there is no number (like in my frontmatter), the "." is shown anyway... So I naturally tried: \def\mycommand#1{\doifnotempty{#1}{#1.}} Which doesn't work! I still get something like . Preamble 1. ChapterOne 1.1 Section So even if no number is given, the doifnotempty block still is executed! I tried a lot of combinations, like \def\mycommand#1{\doifdefined{#1}{#1.}} or \def\mycommand#1{\doifnot{#1}{}{#1.}} But none of these will compile... So at this point, I don't see any solution, which is why I really would appreciate any suggestion! Thank you very much! ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________