Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!jarthur!nntp-server.caltech.edu!laguna.ccsf.caltech.edu!mass From: mass@garfield.caltech.edu (Mass Sivilotti) Newsgroups: comp.text.tex Subject: How do I "print" a TeX dimension? Message-ID: Date: 15 Jun 90 01:58:02 GMT Sender: news@laguna.ccsf.caltech.edu Reply-To: mass@hobiecat.cs.caltech.edu (Mass Sivilotti) Distribution: comp.text.tex Organization: California Institute of Technology Lines: 19 A question for the net.tex.experts: 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 Along the way, I have been able to strip off just the INTEGER part, with the following macros: \def\integerpart#1.#2\end{#1} \newcommand{\theinteger}[1]{\expandafter\integerpart\the#1\end} \typeout{integer part of \the\pagewidth\space = \theinteger\pagewidth} Any suggestions? Thanks in advance, mass sivilotti (mass@hobiecat.cs.caltech.edu)