Monday, July 6, 2009

Measure Width of Text in LaTeX

\newlength{\textwidth}
\settowidth{\textwidth}{hello}

Example:
hello\hspace{\textwidth}hell\_

Similarly:
\settodepth

References:
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ltx-90.html
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ltx-312.html

No comments:

Post a Comment