Article View: comp.text.tex
Article #10581Re: what use is a scaled point?
From: Peter Schmitt
Date: Thu, 21 Jan 1993 10:14
Date: Thu, 21 Jan 1993 10:14
42 lines
1890 bytes
1890 bytes
> From: asnd@msr.triumf.ca (Donald Arseneau)
> Date: 12 Jan 1993 15:59 PST
>
> >>From: pflynn@ccvax.ucd.ie (Peter Flynn)
> >>\divide\lines by\baselineskip
> >>
> >>and you have the approximate number of lines in the box, because the
> >>calculations were done in sp's.
> >>
> >
> >Sorry, but I don't see what this has to do with the fact that TeX
> >internally calculates in sp:
> >height+depth / height of line
> >will always give the number of lines (approximately, if lines are
> >not fixed spaced) - regardless of the length unit used.
>
> Yes it gives a number (integer). But it is in a length register.
> So what length is it?? If the number is 5, the length is 5sp.
>
> Continuing, if you want to subsequently set \lines to have a minimum
> value of 2,
> \ifnum\lines<2 \lines=2sp \fi
>
> If you want to increment the line count,
> \advance \lines 2sp
>
> Donald
>
Just in order to complete the discussion of this topic:
Yes, I overlooked that the result of the division is in a dimension
register (I just calculated length divided by length is a dimensionless
number)
Nevertheless, in essence my statement is true:
-- a dimen-counter may be used in the context of a number:
ifnumdimen0=2 (e.g.)
-- and by setting count0=dimen0 you may transform the dimension to
a number
(otherwise it would be complicated --- though possible --- to
extract the number of lines)
Peter
Technical Details
Message-ID:
<1993Jan21.102224.13630@newssrv.edvz.univie.ac.at>Path:
arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!vm.univie.ac.at!A8131DALShow Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!vm.univie.ac.at!A8131DAL From: A8131DAL@vm.univie.ac.at (Peter Schmitt) Subject: Re: what use is a scaled point? Message-ID: <1993Jan21.102224.13630@newssrv.edvz.univie.ac.at> Sender: news@newssrv.edvz.univie.ac.at (News System - Vienna University) Nntp-Posting-Host: helios.edvz.univie.ac.at Organization: University of Vienna Date: Thu, 21 Jan 1993 10:14:14 GMT Lines: 42