From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22194 Path: news.gmane.org!not-for-mail From: Hans Hagen Outside Newsgroups: gmane.comp.tex.context Subject: Re: Suitable mechanism for Theorems and Definitions Date: Tue, 30 Aug 2005 05:26:43 +0800 Message-ID: <43137D93.8030401@wxs.nl> References: <20050819094833.GA7913@erik.fi.muni.cz> <20050821122716.GA10883@erik.fi.muni.cz> <4308A106.70305@elvenkind.com> <20050821162208.GA16657@erik.fi.muni.cz> <430CD228.9050105@hccnet.nl> <20050824204007.GA2195@erik.fi.muni.cz> <430D987C.7030806@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1125351004 12500 80.91.229.2 (29 Aug 2005 21:30:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2005 21:30:04 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 29 23:29:54 2005 Return-path: 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 1E9r9Q-0005Nz-8N for gctc-ntg-context-518@m.gmane.org; Mon, 29 Aug 2005 23:26:44 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BAEFF12788; Mon, 29 Aug 2005 23:26:43 +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 07854-05-3; Mon, 29 Aug 2005 23:26:38 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D9E1012796; Mon, 29 Aug 2005 23:26:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AB65F12796 for ; Mon, 29 Aug 2005 23:26: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 07854-05-2 for ; Mon, 29 Aug 2005 23:26:35 +0200 (CEST) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id B23A612788 for ; Mon, 29 Aug 2005 23:26:35 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j7TLQUwW018718 for ; Mon, 29 Aug 2005 23:26:30 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id AE14819420; Mon, 29 Aug 2005 22:35:50 +0200 (CEST) Original-Received: from [10.100.1.15] (unknown [10.100.1.15]) by server-1.pragma-net.nl (Postfix) with ESMTP id 7348F9DF1 for ; Mon, 29 Aug 2005 20:35:49 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <430D987C.7030806@elvenkind.com> X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:22194 Archived-At: Taco Hoekwater wrote: > > Hi David, > > Not sure if you are still interested, but here is my "optional title" > hack, revamped for a modern context distro. It creates a second > extra optional argument for the enumeration, nothing too fancy. > The example also shows a way in which you can access the number. > > This does not solve the list generation, sorry. > > Cheers, Taco > > %=========== > > \unprotect > \def\dododefinecomplexenumeration#1#2#3% > {\setvalue{\e!start#1#2}% > {\@EA\dodoubleempty\csname dostart#1#2\endcsname}% > \setvalue{dostart#1#2}[##1][##2]% > {\begingroup\setvalue{#2title}{##2}\getvalue{\e!start#1i#2}[##1]}% > \setvalue{\e!stop#1#2}{\getvalue{\e!stop#1i#2}\endgroup}} > > \def\dodefinecomplexenumeration[#1][#2]% > {\defineenumeration[i#1] > [\c!text=#1,\c!stopper=\getvalue{do#1title},#2]% > \setvalue{do#1title}% > {\doifnotemptyvalue{#1title}{~(\getvalue{#1title})}}% > \dododefinecomplexenumeration{}{#1}{#2}% > \dododefinecomplexenumeration{\v!sub}{#1}{#2}% > \dododefinecomplexenumeration{\v!sub\v!sub}{#1}{#2}% > \dododefinecomplexenumeration{\v!sub\v!sub\v!sub}{#1}{#2}} > > \def\definecomplexenumeration{\dodoubleempty\dodefinecomplexenumeration} > > \protect > > \definecomplexenumeration[lemma] > > \starttext > > \startlemma[lemma1][with a title] > This is lemma \rawnumber[\currentdescriptionnumber] > \stoplemma > > \startsublemma[sublemma1][with another title] > This is sublemma \rawnumber[sub\currentdescriptionnumber] > \stopsublemma > > \stoptext ok, i can cook up something along these lines Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------