From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39770 Path: news.gmane.org!not-for-mail From: Duncan Hothersall Newsgroups: gmane.comp.tex.context Subject: Re: Sections, cross-references and separators Date: Tue, 01 Apr 2008 09:06:34 +0100 Message-ID: <47F1ED0A.1010802@capdm.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207037354 15289 80.91.229.12 (1 Apr 2008 08:09:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2008 08:09:14 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 01 10:09:45 2008 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 1JgbYn-0002NH-R2 for gctc-ntg-context-518@m.gmane.org; Tue, 01 Apr 2008 10:09:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 214681FCA0; Tue, 1 Apr 2008 10:08:56 +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 06399-09-4; Tue, 1 Apr 2008 10:08:10 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BF3711FC27; Tue, 1 Apr 2008 10:08:07 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7E7341FC32 for ; Tue, 1 Apr 2008 10:08:05 +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 05965-05-3 for ; Tue, 1 Apr 2008 10:07:11 +0200 (CEST) Original-Received: from banoffee.capdm.com (banoffee.capdm.com [212.20.255.171]) by ronja.ntg.nl (Postfix) with ESMTP id E15291FC1B for ; Tue, 1 Apr 2008 10:07:10 +0200 (CEST) Original-Received: from [127.0.0.1] (lynx.capdm.com [212.20.255.162]) by banoffee.capdm.com (Postfix) with ESMTP id 80EF53448158 for ; Tue, 1 Apr 2008 08:26:44 +0100 (BST) User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) In-Reply-To: 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:39770 Archived-At: Taco wrote: > In this case it is easier to make the actual chapter number include > the 'A'. That way, you won't have to worry about "separator" at all > (which is good, because its use is confusing). > > Try this: > > @@ -1,4 +1,4 @@ > -\setupheads[separator=] %<-- this can't be right > \setupreferencing[state=start,chapternumber=yes,global=yes] > -\setupsection[section-1][conversion=Characters] > -\setupsection[section-2][previousnumber=yes] > +\def\Mychapter#1{\convertnumber{Characters}{\getvalue{@@sesection-1}}#1} > +\defineconversion[MyChapter][\Mychapter] > +\setupsection[section-2][conversion=MyChapter] > Ah, thanks so much Taco, never thought of that approach - works like a charm. (I also thought that macros with @ in their names could only be used in protected mode, so that's two things I have learned for the price of one.) Do you think this is general interest enough to warrant wikifying? Thanks very much. Duncan ___________________________________________________________________________________ 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 ___________________________________________________________________________________