tags:

views:

48

answers:

3

What is the difference between \hsize, \linewidth, \textwidth and \pagewidth? Which are affected by environments (like an enumeration or a minipage)? Did I miss any useful width lengths?

+2  A: 

There are many more lengths useful to layout in LaTeX. The ones related to "page" layout are mostly here:

http://en.wikibooks.org/wiki/LaTeX/Page_Layout

\linewidth is width of text in current environment.

I myself am not sure about how \hsize relates to the others, although I think it's supposed to be the width of text on the page.

Herbert Sitz
+1 Great link, thanks.
Geoff
+1  A: 

\hsize is a TeX primitive. It is always the width of the current paragraph. \hsize is set at the \begin{document} point depending on \textwidth, 1-page or 2-page and the marging.

Alexey Malistov
You have `\hsize` twice, is the second supposed to be `\pagewidth`?
Geoff
No. Right. `\hsize` twice.
Alexey Malistov
+2  A: 

Further to what Herbet & Alexey say, \textwidth usually does not change while a Latex document is being typeset, and should normally be the width of the bounding box in which all the text inside paragraphs sit in.

\linewidth is a contextual dimension that becomes narrower in environments with indentation, such as list environments. It should be the actual width of the current paragraph.

But of course with macro hackery, you can break any rule you feel like.

Charles Stewart