# How do I remove the occasional vertical space at the top of the page? [closed]

I have a one-inch top margin, which works fine. BUT, if I have a page that's particularly empty (because LaTeX decides not to start a new section toward the bottom of the page), all the text on the page gets moved down one line. How do I fix this? I am using a custom .sty file which basically loads amsbook and redefines a few things for theses at my school.

The page layout code is this (in the sty file), which looks odd (0pt top margin?) but can't quite figure out if that's causing the problem:

\topmargin 0pt
\oddsidemargin=.5in
\evensidemargin=\oddsidemargin
\textwidth 6in
\textheight 8.9in
\marginparwidth 0.5in


On a related note, how does one control LaTeX's decisions about breaking and moving to the next page? I imagine there's a penalty command somewhere but I can't find it.

-

## closed as too localized by lockstep, egreg, Joseph Wright♦Sep 15 '11 at 16:38

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I would be very surprised if the cause were what you're suspecting. On the other hand, fiddling with page setup that way is not much in the style of amsbook, which has a \calclayout macro; this may be a source of problems. – egreg Aug 31 '11 at 14:53
Thanks for the tip. If I copy that macro into this .sty and then replace the topmargin calculation based on paperheight and textheight with with setting it to 1truein then I get the same wiggling top margin problem plus a 1.5in top margin! – Jeff Aug 31 '11 at 17:32
You don't have to copy the macro, just use it after the dimension settings. – egreg Aug 31 '11 at 17:36
Tried this and it did nothing. Please if anyone can help me solve this today it is my last formatting issue before I can submit my dissertation, which needs to go to binding tomorrow if I am to graduate on time. :/ ... I also saw a vertical space macro in amsbook but it appears to deal with vertical space between lines, not at the top of the page. – Jeff Sep 1 '11 at 14:27
Someone mentioned \raggedbottom, but that doesn't do anything either... – Jeff Sep 2 '11 at 13:57