[OS X TeX] centering a resized text field

Ross Moore ross at ics.mq.edu.au
Mon Oct 3 21:46:40 CEST 2005


Hello Ewan,

On 03/10/2005, at 5:22 PM, Ewan Delanoy wrote:

>   Hello all,
>
> as in my opinion the default LaTeX page setting is a waste of space,
> I put the following commands in my preamble :
>
>  \addtolength{\textwidth}{4cm}
>  \addtolength{\textheight}{4cm}
>
>
>  But when I do that two problems arise :
>
> -the text field is no longer centered inside the page,
> and even worse,

The origin of coordinates is at a fixed-point, 1 inch down
and 1 inch to the right of the top-left of the page.

So to add space symmetrically to the typesetting region
--- which after all is only part of the whole page ---
you need to adjust the margins as well as the \textheight
and \textwidth .

e.g.

  \addtolength{\textwidth}{4cm}
  \addtolength{\textheight}{4cm}
  \addtolength{\oddsidemargin}{-2cm}
  \addtolength{\evensidemargin}{-2cm}
  \addtolength{\topmargin}{-2cm}

You need to adjust both the odd/even-side margins
when using the 'twoside' package option, since these
will then be different to allow for the 2-page gutter.


> -the page numbers do not appear anymore because the
> text field overlaps.
>
>   My question are :
>
>  -why do the two commands above produce an unbalanced
> output ? I guess there is an equation like :
>
> \topmargin+\textheight+\footskip= total height of the page

Yep, it is 'like' this, but has a few more summands.

>
> and when LaTeX is asked to increase \textheight, it seems to decrease
> only \footskip instead of modifying evenly both \topmargin and
> \footskip.
>
>  - In any case, what is the simplest way to increase the text  
> field's size
> and keeping it centered ?

As shown above.

If you have headers --- which are not part of the typesetting
area --- then you may want to adjust \topskip instead of \topmargin ,
or maybe split the adjustment between these.
Some experimentation is generally required to get the best-looking
layout.

Also, make sure you print some of the resulting pages, to confirm
that everything looks nicely balanced.
Don't trust what you see in Preview or Acrobat, as this only shows
the contents of the /MediaBox or /CropBox , not how this Box fits
onto the whole A4 (or letter) page.



Hope this helps,

     Ross


P.S.
There are also \hoffset and \voffset parameters that can be
adjusted. In my experience this is a bad thing to do, for
any but small adjustments, since it definitely affects how
the /MediaBox is placed onto the full page. You can end up
with unexpected cropping at print-time.
Yet this may be right for your documents --- best is to just
try it and see.


>
>                                                 Ewan
>
>
> ------------------------- Info --------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>          & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
>
>

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list