From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39559 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Numbering in margin Date: Tue, 18 Mar 2008 17:06:20 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205856606 17099 80.91.229.12 (18 Mar 2008 16:10:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 16:10:06 +0000 (UTC) To: mailing ConTeXt users list for Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 18 17:10:36 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 1JbeOS-0007HM-Ul for gctc-ntg-context-518@m.gmane.org; Tue, 18 Mar 2008 17:10:29 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F32D51FBFB; Tue, 18 Mar 2008 17:09:52 +0100 (CET) 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 20295-01-2; Tue, 18 Mar 2008 17:08:55 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5B4251FBD0; Tue, 18 Mar 2008 17:08:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AC01C1FBBD for ; Tue, 18 Mar 2008 17:08:53 +0100 (CET) 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 20295-01 for ; Tue, 18 Mar 2008 17:08:10 +0100 (CET) Original-Received: from mailout02.sul.t-online.de (mailout02.sul.t-online.de [194.25.134.17]) by ronja.ntg.nl (Postfix) with ESMTP id B16EE1FBD0 for ; Tue, 18 Mar 2008 17:06:38 +0100 (CET) Original-Received: from fwd32.aul.t-online.de by mailout02.sul.t-online.de with smtp id 1JbeKg-00030V-02; Tue, 18 Mar 2008 17:06:34 +0100 Original-Received: from [192.168.0.2] (V8n7KuZ1rhUonDOi-ADYXehEiSIGkogtUOg6zMLr7U1s6CoBCgBZ2KiXUwFDTcfQgV@[87.178.120.191]) by fwd32.aul.t-online.de with esmtp id 1JbeKT-1hAejw0; Tue, 18 Mar 2008 17:06:21 +0100 X-Mailer: Apple Mail (2.919.2) X-ID: V8n7KuZ1rhUonDOi-ADYXehEiSIGkogtUOg6zMLr7U1s6CoBCgBZ2KiXUwFDTcfQgV@t-dialin.net X-TOI-MSGID: 9ade8860-b95d-4543-b8ef-ad1950159c64 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:39559 Archived-At: Hi all, I want some numbers to appear in the paragraph. It's for a commentary, so the numbering isn't continuous, but pretty arbitrary. The problem is, I need two sets of numbers (for sections and subsections), and I want both in the margin, like so: 1 1 Some text 3 More text 4 Even more 3 1 And more 2 and so on 5 Sometimes, there are sections without subsections So far, I have succeeded in doing this with some low-level trickery by defining two commands, LEVELONE and LEVELTWO: \def\LEVELONE#1 {\dontleavehmode\llap{#1\kern1.8em \null}} \def\LEVELTWO#1 {\dontleavehmode\llap{\tfx #1\kern1em \null}} (I need to gobble the space after the command, that's why I included it in the \def). However, I'm wondering if there's a more ConTeXt-like way of doing this, since my next project will be to do this for xml files. I had tried with \inmargin[1] and \inmargin[2], but that didn't quite do what I expected. Any thoughts on this? All best Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________