From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39775 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 10:57:08 +0200 Message-ID: <47F1F8E4.4040700@elvenkind.com> References: <47F1ED0A.1010802@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 1207040273 24491 80.91.229.12 (1 Apr 2008 08:57:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2008 08:57:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 01 10:58:22 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 1JgcJp-0007aH-W6 for gctc-ntg-context-518@m.gmane.org; Tue, 01 Apr 2008 10:58:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 067511FD30; Tue, 1 Apr 2008 10:57:36 +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 15780-01-2; Tue, 1 Apr 2008 10:57:15 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A52861FC7C; Tue, 1 Apr 2008 10:57:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 76AB01FC7C for ; Tue, 1 Apr 2008 10:57:13 +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 12150-08-17 for ; Tue, 1 Apr 2008 10:57:09 +0200 (CEST) Original-Received: from tullamore.elvenkind.com (elvenknd.xs4all.nl [82.95.203.226]) by ronja.ntg.nl (Postfix) with ESMTP id EE6FC1FBFB for ; Tue, 1 Apr 2008 10:57:08 +0200 (CEST) Original-Received: from glenlivet.elvenkind.com (glenlivet.elvenkind.com [10.10.0.6]) by tullamore.elvenkind.com (Postfix) with ESMTP id DE5813050293 for ; Tue, 1 Apr 2008 10:57:08 +0200 (CEST) User-Agent: Thunderbird 2.0.0.0 (X11/20070522) In-Reply-To: <47F1ED0A.1010802@capdm.com> 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:39775 Archived-At: Duncan Hothersall wrote: > 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.) As far as TeX is concerned, I am not actually using the macro myself, just mentioning its name. The \getvalue macro then constructs the actual macro name internally. That works always, but usually macro calls look funny when used in that way. I just found \rawsectionnumber, so with this change it should also work (and look less low-level, which is good if you want to wikify it): \def\Mychapter#1% {\convertnumber{Characters}{\rawsectionnumber{section-1}}#1} 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 ___________________________________________________________________________________