From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35365 Path: news.gmane.org!not-for-mail From: "Wolfgang Schuster" Newsgroups: gmane.comp.tex.context Subject: Re: Enumerations and numbered labels Date: Tue, 10 Jul 2007 13:38:08 +0200 Message-ID: <115224fb0707100438j78b8a962y1e18c1ac435b36d0@mail.gmail.com> References: <77126144-6695-4B36-B5F9-9BFF199B66A4@cs.dal.ca> 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: sea.gmane.org 1184067512 9031 80.91.229.12 (10 Jul 2007 11:38:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Jul 2007 11:38:32 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 10 13:38:29 2007 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 1I8E32-0000fD-VV for gctc-ntg-context-518@m.gmane.org; Tue, 10 Jul 2007 13:38:29 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2EC6720120; Tue, 10 Jul 2007 13:38:26 +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 30151-02-2; Tue, 10 Jul 2007 13:38:16 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A38D5200F8; Tue, 10 Jul 2007 13:38:16 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B160200FA for ; Tue, 10 Jul 2007 13:38:14 +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 29770-04 for ; Tue, 10 Jul 2007 13:38:10 +0200 (CEST) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by ronja.ntg.nl (Postfix) with ESMTP id C085A200F3 for ; Tue, 10 Jul 2007 13:38:09 +0200 (CEST) Original-Received: by wx-out-0506.google.com with SMTP id i27so1372048wxd for ; Tue, 10 Jul 2007 04:38:08 -0700 (PDT) Original-Received: by 10.90.88.13 with SMTP id l13mr2726803agb.1184067488768; Tue, 10 Jul 2007 04:38:08 -0700 (PDT) Original-Received: by 10.90.101.7 with HTTP; Tue, 10 Jul 2007 04:38:08 -0700 (PDT) In-Reply-To: <77126144-6695-4B36-B5F9-9BFF199B66A4@cs.dal.ca> Content-Disposition: inline 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:35365 Archived-At: 2007/7/10, Norbert Zeh : > Hi folks, > > I've recently started to consider ConTeXt as an alternative to my > long-time friend LaTeX. I like ConTeXt very much but noticed a few > things that are either less than ideal or maybe I simply haven't > figured out yet how to do them right. Here are the first two: > > 1) Enumerations > > I've read in a few places that this is what is to be used whenever I > would use theorem-style environments in latex. There are two things > I seem to be unable to do: Creating Theorems that look like this. > > --------------------- > THEOREM 1 It would be nice if Context could produce a theorem where > the title is not separated from the text and the next line has no > hanging indent. > --------------------- \defineenumeration[theorem][text=THEOREM,location=left,hang=1] \starttext \theorem \input knuth \stoptext > I was able to produce only > > ---------------------- > THEOREM 1 > > It would be nice ... > ---------------------- > > or > > ---------------------- > THEOREM 1 It would > be nice ... > ---------------------- > > using location=top or location=hanging. What I want is no hanging > indent at all. (I also tried location=serried, which produced an > overly large gap between THEOREM 1 and the theorem text. The second > thing I am used to in latex is the option to place things in > parentheses by providing an optional argument to the environment. > E.g., in assignments I typeset, I often have either > > \begin{question} > ... > \end{question} > > which simply produces > > -------------------- > Question 1 ... > -------------------- > > or > > \begin{question}[20 marks] > ... > \end{question} > > which produces > > -------------------- > Question 1 (20 marks) ... > -------------------- > > This second option is easy to simulate if I can produce something > that has no hanging indents. As it is, I can't. > > 2) Numbered labels > > I tried to use numbered labels plus a little bit of tex-code to > simulate the above environment. The gist is that I used > > \definelabel[question][location=intext,text=Question] > > to define the label and, wherever I needed a new question, \question > [ref]. > > The result of writing \question[ref], however, was "Question Question > 1". The label always seemed to be duplicated for some reason. Is > this a known bug? http://www.tug.org/pracjourn/2006-4/mahajan/ > Thanks for your help with this. > > Cheers, > Norbert Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________