2

I want to adjust only the top margin (using Article class). All other margins should remain the same. How do I use the geometry package to do this? As soon as I load the geometry package it changes all margins to its own defaults. I guess the answer is too re-specify the Article margins using the geometry options but I don't know what exact margins I would need to put there.

My question is close to Emulating article class margins with the geometry package. However, it differs in that I do want to set the same margins for the whole document. I just want to only alter one margin without affecting the others.


In the log I find for an article:

* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=345.0pt
* \textheight=550.0pt
* \oddsidemargin=62.0pt
* \evensidemargin=62.0pt
* \topmargin=16.0pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=10.0pt
* \footskip=30.0pt
* \marginparwidth=65.0pt
* \marginparsep=11.0pt
* \columnsep=10.0pt
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse

I started putting this as input into \geometry but it is not immediately clear to me how to do this for all the settings. I seem to be using some of them wrong.

I get close to the article style again using:

\geometry{paperwidth=614.295pt, paperheight=794.96999pt,textwidth=345.0pt, textheight=550.0pt, 
headheight=12.0pt, headsep=25.0pt,
footskip=30.0pt, marginparwidth=65.0pt, marginparsep=11.0pt, columnsep=10.0pt}

Some names as presented here do not seem to match the input form in geometry. For instance oddsidemargin=62.0pt does not work. I also tried the top margin by setting top=16.0pt. This clearly gives the wrong result.

  • Maybe this in the preamble, with or without the geometry package: \headheight=\dimexpr\headheight-1in\relax \textheight=\dimexpr\textheight+1in\relax – Steven B. Segletes Feb 23 '18 at 16:40
  • Also, if you want to load geometry without disturbing the predefined documentclass settings, use the pass option of geometry. See tex.stackexchange.com/questions/179116/… – Steven B. Segletes Feb 23 '18 at 16:43
  • you can try \topmargin=\dimexpr<NewValue>-1in\relax before \usepackage[pass]{geometry} or don't load it at all. – touhami Feb 23 '18 at 17:05
  • @touhami But you need to change the text block height, too, to keep the bottom margin the same, don't you? – cfr Feb 24 '18 at 2:51
  • 1
    theoretically you can do \textheight=\dimexpr\textheight+\topmargin+1in-<NewValue>\relax \topmargin=\dimexpr<NewValue>-1in\relax \usepackage[pass]{geometry} – touhami Feb 24 '18 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.