[Tex/LaTex] Which unit of measurement for textwidth


Which unit of measurement should I use to specify \textwidth?

I used to specify \textheight in cm but read in some doc that one should always use multiples of \baselineskip. Indeed, the output improved considerably and I got rid of almost all badness messages. Hence I would like to know which unit is optimal for the specification of \textwidth or, in general, horizontal lengths? Of course it is not \baselineskip but what then?

My current specification is as follows:


Best Answer

In theory you can use any supported unit. What is important, however, is that in case you have only normal paragraph text that this text properly fills the page (meaning that it doesn't have to be stretched apart to fill the page body as there may be nothing to stretch). It is therefore useful to define the \textheight as a function of \baselineskip and \topskip.

\baselineskip  is the distance from one baseline to the next in a paragraph
\topskip       is the distance from the top of the page area to the baseline of 
               the first line (if the page starts with a line)

For example in the standard book class (without an option like 11pt) the \baselineskipis 12pt and the \topskip is 10pt so a page with 40 lines should be 478pt. Of course you could achieve the same by giving the equivalent of that value in cm or mm but given that baselineskips are traditionally specified in points ...

If you use a value that isn't a multiple of baselineskip + topskip you may find to get "underfull" warnings, because TeX then tries to stretch pages to fill all space (that would happen in the bookclass, for example, as this class uses the setting `\flushbottom).

However, a better solution might be to use the package geometry that does a lot of work like this for you when setting up the page area. Have a look at its documentation.