From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46973 Path: news.gmane.org!not-for-mail From: Alan Stone Newsgroups: gmane.comp.tex.context Subject: Re: number of lines ? Date: Thu, 22 Jan 2009 15:39:56 +0100 Message-ID: <326847810901220639w6ffede09hbc5c3f0378c79129@mail.gmail.com> References: <326847810901220302l29b87b99y1365b88515261b2b@mail.gmail.com> <115224fb0901220322o283aeee0vc5dff37b20d9bdca@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1641363046==" X-Trace: ger.gmane.org 1232635313 27176 80.91.229.12 (22 Jan 2009 14:41:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2009 14:41:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 22 15:43:04 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 1LQ0ls-0000xX-0P for gctc-ntg-context-518@m.gmane.org; Thu, 22 Jan 2009 15:43:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1F6F91FE72; Thu, 22 Jan 2009 15:41:44 +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 10478-03-2; Thu, 22 Jan 2009 15:40:36 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50ABA1FE53; Thu, 22 Jan 2009 15:40:36 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 489061FE53 for ; Thu, 22 Jan 2009 15:40:34 +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 06044-04 for ; Thu, 22 Jan 2009 15:39:57 +0100 (CET) Original-Received: from filter4-nij.mf.surf.net (filter4-nij.mf.surf.net [195.169.124.155]) by ronja.ntg.nl (Postfix) with ESMTP id 822261FB57 for ; Thu, 22 Jan 2009 15:39:57 +0100 (CET) Original-Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.145]) by filter4-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n0MEdugJ001571 for ; Thu, 22 Jan 2009 15:39:57 +0100 Original-Received: by ey-out-1920.google.com with SMTP id 13so543667eye.38 for ; Thu, 22 Jan 2009 06:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=1SvfFYtIrhnYTbgdaFvQbFHXoq58yOsiaqogBZAJ0fw=; b=QYNuPJawcDf33LQyIimzYm1A6c6S4OUnLvH0TVqNIVZbwv4zgsolSi1euBjIE0Teha 8Mlb9Y+qUBlSFpf+Sqti0wpMBbe61JCuQMNHmMqXVXU34TdTtC5TpKNiJBBXS1DfmL0q 4U3aV4cdasnnSVPsZIqN4XKm2YbHeWLScM91I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=oc5ikvNfgXYEczsz2ybSxp5kEO+9XSfXJj3nLjGrkmeovaHqcQ+n72+/oI1FshZ3R9 5T8ZB6lCgqHkRkurmHu6TllXh3Rpd1NIK+DDwSFxIpWneRhbxcGYQsANqTD+Oh0yP0+1 zc1jn6gynkOSfbl2Ea51nbmjXQkfY8AmuoJC4= Original-Received: by 10.210.12.18 with SMTP id 18mr6387348ebl.148.1232635196553; Thu, 22 Jan 2009 06:39:56 -0800 (PST) In-Reply-To: <115224fb0901220322o283aeee0vc5dff37b20d9bdca@mail.gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.78.145; 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: 169187568 - 09d695bd7cac X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.155 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:46973 Archived-At: --===============1641363046== Content-Type: multipart/alternative; boundary=0015174bdfd80739580461133f28 --0015174bdfd80739580461133f28 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Jan 22, 2009 at 12:22 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote: > On Thu, Jan 22, 2009 at 12:02 PM, Alan Stone > wrote: > > Hi, > > > > Is there a command which returns the number of lines for a given portion > of > > text ? > > \starttext > > \setbox\scratchbox\vbox{\input knuth\par} > > \getnoflines\htdp\scratchbox \getnoflines{\htdp\scratchbox} % this works > Your text has \noflines\ lines. or: Your text has \noflines lines. > \stoptext > \scratchingmyhair... ;O) ! Missing number, treated as zero. l l.7 Your text has \noflines\ l ines. Alan -- Best, Alan * TeX engine = LuaTeX *ConTeXt minimals ver: 2009.01.18 14:39 MKIV fmt: 2009.1.22 int: english/english * Ubuntu 8.04 Hardy Heron, Windows XP SP3 Home --0015174bdfd80739580461133f28 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Jan 22, 2009 at 12:22 PM, Wolfgang Schus= ter <schuster.wolfgang@googlemail.com> wrote:
On Thu, Jan 22, 2009 at 12:02 PM, Alan Stone
<software.list.1es9s@gm= ail.com> wrote:
> Hi,
>
> Is there a command which returns the number of lines for a given porti= on of
> text ?

\starttext

\setbox\scratchbox\vbox{\input knuth\par}

\getnoflines\htdp\scratchbox

\getnoflines{\htdp\scratc= hbox}  % this works
 
Your text has \noflines\ lines.

or: Your text has \nof= lines lines.
 
\stoptext

\scratchingmyhair...  ;O)

! Missing number, treated as zero.
<to be read again>
 &n= bsp;            = ;     l
l.7 Your text has \noflines\ l
 &nbs= p;            &= nbsp;           &nbs= p;   ines.

Alan

--
Best,
Alan

* TeX e= ngine =3D LuaTeX
*ConTeXt  minimals ver: 2009.01.18 14:39 MKIV  fmt: 2009.1.22 &nb= sp;int: english/english
* Ubuntu 8.04 Hardy Heron, Windows XP SP3 Home --0015174bdfd80739580461133f28-- --===============1641363046== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1641363046==--