Path: utzoo!attcan!uunet!samsung!munnari.oz.au!metro!usage.csd.unsw.oz.au!usage.csd!lambert From: lambert@spectrum.eecs.unsw.oz (Tim Lambert) Newsgroups: comp.text.tex Subject: Re: How do I "print" a TeX dimension? Message-ID: Date: 15 Jun 90 11:40:47 GMT References: Sender: news@usage.csd.unsw.oz.au Distribution: comp.text.tex Organization: none Lines: 17 In-reply-to: mass@garfield.caltech.edu's message of 15 Jun 90 01:58:02 GMT >>>>> On 15 Jun 90 01:58:02 GMT, mass@garfield.caltech.edu (Mass Sivilotti) said: In article mass@garfield.caltech.edu (Mass Sivilotti) writes: > I need to generate (in a \special) only the NUMERIC part of > a TeX dimension. For example, if \the\pagewidth gives 350.642pt, > I would like something like \thenumber\pagewidth to give 350.642 Page 375 of the TeXbook shows you how to do this: {\catcode`p=12 \catcode`t=12 \gdef\EATPT#1pt{#1}} \def\thenumber#1{\expandafter\EATPT\the#1} The tricky bit is that the `p' and the `t' that `\the' give you are of category 12. Tim