From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/48167 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: paragraph question (the return :O) Date: Tue, 10 Mar 2009 16:35:34 +0100 Message-ID: References: <326847810903100806w49882d04p30bb179a5bc3b9b7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1236699449 20194 80.91.229.12 (10 Mar 2009 15:37:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Mar 2009 15:37:29 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 10 16:38:46 2009 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 1Lh42W-00065W-VI for gctc-ntg-context-518@m.gmane.org; Tue, 10 Mar 2009 16:38:45 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3A7C61FB5A; Tue, 10 Mar 2009 16:37:19 +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 32144-04; Tue, 10 Mar 2009 16:36:49 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 44CFA1FB14; Tue, 10 Mar 2009 16:36:49 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 89FAD1FB14 for ; Tue, 10 Mar 2009 16:36:47 +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 26886-06-4 for ; Tue, 10 Mar 2009 16:36:41 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by ronja.ntg.nl (Postfix) with ESMTP id 04EC51FA4C for ; Tue, 10 Mar 2009 16:36:41 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by filter1-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n2AFad86005653 for ; Tue, 10 Mar 2009 16:36:39 +0100 Original-Received: by fg-out-1718.google.com with SMTP id e21so946914fga.8 for ; Tue, 10 Mar 2009 08:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=c6C0OcOuDaxKVHJqQ9x5WfMtqGRDoRUurj5V1j4JQeI=; b=nEin2E5uq6GjAINr/Q+fnCGiutvKteT7N1stjsopbzKZruCJJ+WPsOOZZKtZu7Vf3d eHTKc+3Wxdwd7bLBRt8Oco6Soc8/wVufN4g76X2wX4i02nytdNO8h5o6alXrNk8rNVsf 4Ap/uDR9dCNcCqBBWAtV2hacz6jzv0j3vTGbs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=eWCNQU8Z9FpOlexFSX5fODVOi9GEX7AEcA88fHDOai3XLWAe89530JN/EPvTdjv5DV WwzT70dK1C5gHS+zk19Po2zEkO5fCRiWopH+EzBYsmYGnNHRjqDB9M9G1xxXLfKQRWyU MIa0jm3wVx6DEBjpfT385phJZW67LTYFy3j2U= Original-Received: by 10.86.60.14 with SMTP id i14mr5076945fga.78.1236699399550; Tue, 10 Mar 2009 08:36:39 -0700 (PDT) Original-Received: from ?10.70.55.59? ([82.113.106.147]) by mx.google.com with ESMTPS id e20sm521532fga.53.2009.03.10.08.36.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 10 Mar 2009 08:36:38 -0700 (PDT) In-Reply-To: <326847810903100806w49882d04p30bb179a5bc3b9b7@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.14.220.159; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 191413994 - 45b68715846a X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:48167 Archived-At: Am 10.03.2009 um 16:06 schrieb Alan Stone: > Hi, > > Re: files in attachment > > Why is step 3 typeset in chapter 2's first paragraph instead of > chapter 1's first paragraph and how to correct ? I still say it's not a very good idea to do this but here is a fixed version of your macros. You should always take care to keep scratch counters/dimenens/... local. \def\doCountLines#1\par{% \begingroup \setbox\scratchbox\vbox{#1\par}% \getnoflines{\htdp\scratchbox}% \global\parlines=\number\numexpr\noflines (step 2: P\space\the\parnumber, \the\parlines\space L)\relax \ifnum \parlines = 1 (step 3: P\space \the\parnumber, \the\parlines\space L)% \fi \endgroup#1\par} \def\CountLines{% \global\parnumber=0 \EveryPar{% \advance\parnumber by 1 % (step 1: P\space\the\parnumber, \the\parlines\space L) \ifnum \parnumber = 1 \expandafter\doCountLines \fi}} 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 ___________________________________________________________________________________