Show \textwidth and \linewidth values in latex

Alec Jacobson

April 11, 2012

weblog/

Here's a snippet you can paste into your latex document to reveal the values of \textwidth and \linewidth printed into your document. First include this in your header:
\usepackage{layouts}
Then in your content someplace:
textwidth: \printinunitsof{in}\prntlen{\textwidth}

linewidth: \printinunitsof{in}\prntlen{\linewidth}