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?
views:
48answers:
3There 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.
\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.
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.