From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39766 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Sections, cross-references and separators Date: Tue, 01 Apr 2008 08:38:15 +0200 Message-ID: <47F1D857.1010706@elvenkind.com> References: <47F11EA5.1090708@capdm.com> 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 1207031966 31607 80.91.229.12 (1 Apr 2008 06:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2008 06:39:26 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 01 08:39:57 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 1Jga9y-0002lC-Ka for gctc-ntg-context-518@m.gmane.org; Tue, 01 Apr 2008 08:39:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AEF741FADF; Tue, 1 Apr 2008 08:39:10 +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 19235-06-9; Tue, 1 Apr 2008 08:38:51 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0C4EC1FB1D; Tue, 1 Apr 2008 08:38:51 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BD2F41FADF for ; Tue, 1 Apr 2008 08:38:49 +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 19235-06-8 for ; Tue, 1 Apr 2008 08:38:15 +0200 (CEST) Original-Received: from smtp-vbr6.xs4all.nl (smtp-vbr6.xs4all.nl [194.109.24.26]) by ronja.ntg.nl (Postfix) with ESMTP id A349F1FB1D for ; Tue, 1 Apr 2008 08:38:15 +0200 (CEST) Original-Received: from [10.10.0.6] (boo.demon.nl [82.161.175.147]) (authenticated bits=0) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id m316cF8x060561 for ; Tue, 1 Apr 2008 08:38:15 +0200 (CEST) (envelope-from taco@elvenkind.com) User-Agent: Thunderbird 1.5.0.10 (X11/20070305) In-Reply-To: <47F11EA5.1090708@capdm.com> X-Virus-Scanned: by XS4ALL Virus Scanner 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:39766 Archived-At: Duncan Hothersall wrote: > What I am aiming for is a style where: > Parts are labelled A, B, C [done], > Chapters are labelled A1, A2, A3 [done, but...], > Cross-references to Chapters call them A1, A2, A3 [not done: I'm > getting A.1] > Figures are labelled A1.1, A1.2 [not done; I'm getting A.11 (eek!)] > Cross-references to Figures call them A1.1, A1.2 [not done: I'm > getting A.11] 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] Question for Hans: is there a nicer way to get at the part number? The explicit @@se is a bit too low-level for my taste ... Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________