From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22122 Path: news.gmane.org!not-for-mail From: Rob Ermers Newsgroups: gmane.comp.tex.context Subject: Re: Suitable mechanism for Theorems and Definitions Date: Wed, 24 Aug 2005 22:01:44 +0200 Message-ID: <430CD228.9050105@hccnet.nl> References: <20050819094833.GA7913@erik.fi.muni.cz> <20050821122716.GA10883@erik.fi.muni.cz> <4308A106.70305@elvenkind.com> <20050821162208.GA16657@erik.fi.muni.cz> Reply-To: r.ermers@hccnet.nl, 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 1124913751 5218 80.91.229.2 (24 Aug 2005 20:02:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Aug 2005 20:02:31 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 24 22:02:22 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 1E81Pa-00064U-MN for gctc-ntg-context-518@m.gmane.org; Wed, 24 Aug 2005 21:59:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 182DC127A3; Wed, 24 Aug 2005 21:59:48 +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 23312-05; Wed, 24 Aug 2005 21:59:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C558812796; Wed, 24 Aug 2005 21:59:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E254112796 for ; Wed, 24 Aug 2005 21:59:41 +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 23360-04 for ; Wed, 24 Aug 2005 21:59:40 +0200 (CEST) Original-Received: from hnexfe11.hetnet.nl (hnexfe11.hetnet.nl [195.121.6.177]) by ronja.ntg.nl (Postfix) with ESMTP id BC3DE1277F for ; Wed, 24 Aug 2005 21:59:40 +0200 (CEST) Original-Received: from [127.0.0.1] ([81.206.233.107]) by hnexfe11.hetnet.nl with Microsoft SMTPSVC(5.0.2195.6874); Wed, 24 Aug 2005 21:59:36 +0200 User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <20050821162208.GA16657@erik.fi.muni.cz> X-OriginalArrivalTime: 24 Aug 2005 19:59:36.0201 (UTC) FILETIME=[5A5E6F90:01C5A8E6] 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:22122 Archived-At: Hi friends, In David's mail I found one of the problem I had been thinking of too, and I tried his code. Unfortionately, it does not work. I don't need it for math, but for case descriptions. A case consists of the following elements: Case 1 Eating fruit is healthy Text text text - case description -- Questions: 1. abcd 2. efgh .... Answers: 1. aaa bb 2. dderere ... Case 2 Everything about vitamins ... The elements themselves I can put in blocks in order to be able to separate the q's and a's. What I am wondering about is how to include the title in the macro. It does not seem very difficult, but I can't figure out how. The theorem environment seemed promising, but David's suggestion does not process. Has anyone an idea? Kind regards, Robert fonts : using map file: 8r-base.map fonts : using map file: ec-public-lm.map fonts : using map file: original-base.map systems : begin file tst4 at line 31 ! Undefined control sequence. \dostartLemma ...irstargument \startMathParagraph [#1] \else \startMathParag... l.34 ...Lemma[reference]{Algorithm xyz terminates} ? ! Undefined control sequence. l.36 \stopLemma David Antos wrote: > Hello Taco, > > On Sun, Aug 21, 2005 at 05:43:02PM +0200, Taco Hoekwater wrote: > >>The "a while" turned out to be around 1999, and the code (hack) I >>used back then is no longer even remotely usable (for one because >>context was still in dutch, then), but I'll see if I can update my >>patch. > > > :-), that's great :-). > > In the meantime, I solved the second part, i.e., adding the additional > describing text. It goes somehow like this (well, it's a hack, but it > works): > > % MathParagraph is the enumeration (it ensures references and numbering, > % and typesetting all the texts). In command, it calls a macro that refers > % to \MathParagraphType etc. > > \def\startLemma{\dosingleempty\dostartLemma} > \def\dostartLemma[#1]#2 {% > \def\MathParagraphType{Lemma} > \def\MathParagraphName{#2} > \def\MathParagraphList{MathParagraphs} > \iffirstargument > \startMathParagraph[#1] > \else > \startMathParagraph > \fi > } > \let\stopLemma\stopMathParagraph > > So I can use > \startLemma[reference]{Algorithm xyz terminates} > ... > \stopLemma > > I came to the idea to misuse command= to typeset the header and write to > the list, it is given an argument containing the number of the enumeration. > Anyway, it is not easy to feed it into \expanded{\writetolist...} as the > argument is something with \edef and a pile of pretty ugly macros :-), so I > still use \precedingsectionnumber\numberMathParagraph :-( > > To sum up, a good way to obtain current enumeration number (in a form that > goes into lists, etc.) would be completely enough, provided that one > writes hacks to solve the rest (and does end up finding the real macro > names with \tracingmacros=1 :-)). Creating something like > enumerateddescription (a description with names and possibility to write > lists) would be much nicer, of course :-)) > > Thank you very much, > D.A. > > P.S.: Hans said once that a Dutch mathematical journal is typeset with > ConTeXt. Do you have an idea how they typeset theorems? >