From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/54886 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Help watned for numbered descriptions Date: Mon, 30 Nov 2009 15:15:39 +0100 Message-ID: <5A20AD1B-4034-4FA5-A7C2-0EECA669D3C6@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259590570 675 80.91.229.12 (30 Nov 2009 14:16:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 14:16:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 30 15:16:02 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NF72g-0004ea-76 for gctc-ntg-context-518@m.gmane.org; Mon, 30 Nov 2009 15:15:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 84E85C9BC1; Mon, 30 Nov 2009 15:12:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MeNxFL0Vk-aE; Mon, 30 Nov 2009 15:12:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7857BC9B80; Mon, 30 Nov 2009 15:12:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4A8E7C9B80 for ; Mon, 30 Nov 2009 15:12:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lhLh1femxtfr for ; Mon, 30 Nov 2009 15:12:39 +0100 (CET) Original-Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.148]) by balder.ntg.nl (Postfix) with ESMTP id DC9D1C9B7A for ; Mon, 30 Nov 2009 15:12:38 +0100 (CET) Original-Received: by ey-out-1920.google.com with SMTP id 26so1049633eyw.6 for ; Mon, 30 Nov 2009 06:15:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=1nquevTSQUH36zKNBzAYFwY8QBdUbYcd8AJVxI8U7FY=; b=nuzMiobi1vfMP4TTNjuJEFZjZySODu9hr7Ppzq1LuDOJ7IsmxvxZB/XruN5esHnZ+s /yqIf6mFHiz+SSDLWnTMbWTnQfak5Nn1hDsCPm94Eupm/GCROlxeoAjRMFV5TayAOGFv INlCOlW3Ni+1GzzGoEHShiJ2pNU4Xd9bB/Kjw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=VThHnJgiZIJwesqThKvMy/Hr5P7dW2DVQnj1qmzS5xUWVO5JhV4q7YE9ryLimu9evv /f1q6Qea6FAWOitQYAsqK18nZMMQjwm6uk/CT6SpDn4raH45wt6qxvKW/jLh0WCkUwp/ vuKNygxwr0x2Lj2MYdb+RJbaCP9iGW1a/4xMs= Original-Received: by 10.213.100.167 with SMTP id y39mr4903997ebn.59.1259590541648; Mon, 30 Nov 2009 06:15:41 -0800 (PST) Original-Received: from ?192.168.1.20? (77.24.85-79.rev.gaoland.net [79.85.24.77]) by mx.google.com with ESMTPS id 7sm6738078eyg.25.2009.11.30.06.15.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Nov 2009 06:15:40 -0800 (PST) X-Mailer: Apple Mail (2.1077) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:54886 Archived-At: Hi all, I need help for the following situation: in a maths paper I would like to h= ave Definitions, Lemmas, Theorems, etc, numbered in a sequential way in eac= h section if any, the numbers being set before the header, and also to be a= ble to refer to them through cross references. For instance, when there is = indeed at least a section, in section 1, I would like to have something like 1.1 Definition. Here is the text of the definition in slanted style. =85 some text=85 1.2 Lemma. Here is the text of the lemma in slanted style. =85some text=85 1.3 Theorem. Here is the text of the theorem in slanted style. =85some text=85 1.4 Corollary. Here is the text of the corollary in slanted style. And if there is no section at all: 1. Definition. Here is the text of the definition in slanted style. =85 some text=85 2. Lemma. Here is the text of the lemma in slanted style. =85some text=85 3. Theorem. Here is the text of the theorem in slanted style. =85some text=85 4. Corollary. Here is the text of the corollary in slanted style. One way would be to define 4 descriptions or enumerations with = \definedescription or \defineenumeration but then I don't know how to have numbers incremented in a sequential way i= n all these descriptions. = Another issue with this approach would be that then if one wants to have fo= r example a Conjecture or a Guess, one has to define a new description or e= numeration. Has anyone run into such a situation? The example below shows what I need to do (but actually I wasn't able to ad= d the section number as a prefix to the number=85). Best regards: OK %%%% begin \newcounter\Lemmacount \setcounter\Lemmacount1 \def\Lemmanumber% {\global\increment\Lemmacount {\bf \Lemmacount.~}} = \def\startLemma#1% {\blank \Lemmanumber~{\bf #1.} \start\sl} \def\stopLemma% {\blank \stop} \starttext Some text before the numbered descriptions start. \startLemma{Definition} This is the first numbered definition; it's short. \stopLemma Here some more text\dots and then a lemma: \startLemma{Lemma} This is another numbered definition. It's long enough to wrap around onto more than one line, so as to show that these can be numbered and contain as= well blank lines and formulas \startformula a^2 + b^2 =3D c^2 \stopformula And some comment after the formula. \stopLemma And here is the remainder of the text\dots \stoptext %%%% end ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________