@Canageek hm, well... maybe just set the bottom margin to 1.5cm? ;-) It's a hack but if you just need to get this to look right on paper, it should work.
@DavidZaslavsky Do you by any chance know how to prevent a Row[] from line-wrapping in Mathematica? It does that when I export to PDF. (If you don't, don't search for it)
@Canageek So \usepackage[letterpaper,margin=2cm]{geometry} should work. Unless it's a problem regarding A4 paper versus Letter. If you ask for info about the PDF, what are the dimensions shown?
I think it is the page number at the bottom, since all the other ones are spot on. Also it could just be an artifact of the number of lines on the page not coming out to 2 cm; I bet that is it; If I have 1 extra line on the page then I get too small a margine, if I have 1 less then I get too large a margine, duhhh.
@Canagreek are are you measuring the final margin by looking at the final printout? depending on your material TeX may be having trouble breaking the page and so leave it overfull or underful in which case th apparent margin is wrong (but the log file will tell all)
@Canageek also make sure textheight is topsep plus an integer multiple of baselineskip otherwise you can't get a page full of text in to the page without something giving
@DavidCarlisle I said screw it and changed the top margin to be 1.8 cm. The bottom one is close to 2 now, and it makes up for the whitespace LaTeX introduces via the fact it has titles (though admittedly very small ones, but I'm only 2 lines over.)
Question: I have a command \newcommand\foo[1]{\gdef\@foo{#1}} which is then called in a package (to set the default for \@foo). When I try to use \foo in the preamble, it has no effect, but when I use it after \begin{document} it works. Is there some obvious reason for this?
@Canageek the very first document I did in LaTeX had to have very exact spacing (as I was printing it on to a pre-printed form) I ended up using picture mode:-)
@egreg I also have \usepackage{tgtermes}, a title written out in \large and 4 section headers. :S I can give you the exact file but this isn't a MWE time, this is a 'fiddle with this damn thing' time. I think I've gotten it close enough.
@egreg really? How would it fit the text on in that case? Also, yes, I have approximatly 1.5 zillion packages loaded. I figured it was just a case of ((font height)*(lines of text) + (space taken up by title) + (Space taken up by section titles) != 11 inches - 4 cm
@egreg Manually? What do you mean? Also I've gotten it close enough for my needs; If he complains I'll just point out that the section headers take up extra space and remove them, in which case it will easily fit on one page. Or I'll make a title page with nothing but my title and name, again which will make everything fit on one page.
@egreg I get the feeling that he was more worried about us handing him something with typefont 14, 1 inch margines and far, far too little text ;)
@egreg No no, sorry. I was trying to say: I think he said 1 page, 2 cm margines not becuse he likes 2 cm margines, but becuse he has had students use '1 page' to mean 'almost no text' in past.
@Canageek You may be able to squeeze a line more by cleverly using \linespread. Or conversely, you can fit exactly the text you have so that it ends at the bottom
@egreg Nice idea, but I found moving the title into the top margin by 0.2 cm worked pretty well, and doesn't hurt my ethics since I don't need a title and could just move it to its own page.
@AlanMunn I don't understand. You have \newcommand{\newclosing}[1]{\gdef\alan@closing{#1}} in the package mypack; you say \usepackage{mypack} and then \newclosing{Ciao} in the preamble. After this \show\alan@closing says "Undefined"?
@egreg Sorry. I just figured out the problem. The \newclosing in the package is wrapped in \AtBeginDocument. That explains everything. No idea why I did that. Removing it solves the problem. Thanks.