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:
\usepackage[
textwidth=16cm,
outer=2cm,
textheight=45\baselineskip,
headheight=\baselineskip,
includehead=true,
heightrounded,
]{geometry}
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
.For example in the standard book class (without an option like
11pt
) the\baselineskip
is 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 incm
ormm
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
book
class, 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.