From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30700 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: [Fwd: Line numbering] Date: Thu, 07 Sep 2006 18:22:18 +0200 Message-ID: <4500473A.3040708@wxs.nl> References: <1157604236.2206.437.camel@danube.river-valley.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1157646182 31492 80.91.229.2 (7 Sep 2006 16:23:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Sep 2006 16:23:02 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 07 18:22:59 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1GLMe8-0008WI-1X for gctc-ntg-context-518@m.gmane.org; Thu, 07 Sep 2006 18:22:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 61DA61FEB4; Thu, 7 Sep 2006 18:22:31 +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 24631-05-6; Thu, 7 Sep 2006 18:22:24 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 288201FEB5; Thu, 7 Sep 2006 18:22:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EFE311FEB5 for ; Thu, 7 Sep 2006 18:22:19 +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 24631-05-5 for ; Thu, 7 Sep 2006 18:22:14 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with SMTP id 6AC3A1FEB4 for ; Thu, 7 Sep 2006 18:22:14 +0200 (CEST) Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 5727 for ; Thu, 07 Sep 2006 18:22:14 +0200 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) Original-To: mailing list for ConTeXt users In-Reply-To: X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:30700 Archived-At: Aditya Mahajan wrote: > Hi CVR, > > >> From: CV Radhakrishnan >> Reply-To: mailing list for ConTeXt users >> To: Mailing list for ConTeXt users >> Subject: [NTG-context] Line numbering >> Date: Sat, 02 Sep 2006 10:13:31 +0530 >> >> Dear all, >> >> Forgive me if I sound naive. I searched the archives, but could not >> find the solution for my following problem: >> >> I need to have line numbers for the text formatted in two columns. The >> numbers for left column shall appear in the left side and that for right >> column shall appear in the right side of the page. location=inmargin >> option to the \setuplinenumbering doesn't help much. Please take a look >> at the following image: >> >> http://www.river-valley.com/cvr/one.png >> >> which will give you an idea of my requirement. Any help in this matter >> will be highly apprecaited and thanks in advance. >> > > I do not know how to automate what you want. An ugly solution is to > specify the column breaks yourself, something like > > \unprotect > \def\dosetuplinenumbering[#1]% > {\getparameters[\??rn][\c!start=1,\c!step=1,#1]% > % \global\linenumber\plusone > % Do not reset linenumber. Why is this here? > } > \protect > > > \starttext > \startcolumns > \setuplinenumbering[location=inleft] > \startlinenumbering > \input knuth > \stoplinenumbering > \column > \setuplinenumbering[location=inright] > \startlinenumbering[continue] > \input knuth > \stoplinenumbering > \stopcolumns > \stoptext > proof of concept: \newcounter\TestNumber \let\normaldodoplacelinenumber\dodoplacelinenumber \def\dodoplacelinenumber {\doglobal\increment\TestNumber \xypos{lnm:\TestNumber}% \ifdim\MPx{lnm:\TestNumber}>.5\makeupwidth \swapmacros\inleftmargin\inrightmargin \fi \normaldodoplacelinenumber} \setuplinenumbering[location=inleft] \startcolumns \startlinenumbering \input tufte \endgraf \input tufte \endgraf \input tufte \endgraf \stoplinenumbering \stopcolumns \stoptext in order to let this work ok (spacing) we need to write a nice patch (and also use the opportunity to clean up some code) which will take a couple of hours, so not today .. 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 -----------------------------------------------------------------