[pdftex] [Slightly OT] Width of ragged text

Hartmut Henkel hartmut_henkel at gmx.de
Tue Dec 23 20:45:25 CET 2003


On Mon, 22 Dec 2003, Magnus Lie Hetland wrote:

> The question is simply: How do I find the width of a piece of
> ragged(right) text? I put the text in a parbox of a given width to
> break it, but then, of course, it doesn't fill the width of the box,
> and I no longer know how wide it is. Is it possible to find out?

Something similar does varwidth.sty by Donald Arseneau, e. g.:

\documentclass{article}
\usepackage{varwidth}
\begin{document}
\hbox{\vrule\begin{varwidth}{90mm}
\raggedright
\input tufte
\end{varwidth}\vrule}
\end{document}

Regards, Hartmut


------------------------------------------------------------------------
Hartmut Henkel, Oftersheim, Germany
------------------------------------------------------------------------


More information about the pdftex mailing list