When working on a joint project, my collaborators and I encountered that we obtain significantly different PDF outputs with the same latex source. To be more specific, this already happens with the example .tex (and .sty) files for this year's NeurIPS 2021 conference: https://neurips.cc/Conferences/2021/PaperInformation/StyleFiles. When compiling the example .tex file on Overleaf, I obtain exactly the same pdf output as provided by the organizers, with a length of 5.5 pages (https://media.neurips.cc/Conferences/NeurIPS2021/Styles/neurips_2021.pdf). When compiling the same file (with the same style file) on my local system, the result is half a page longer, filling the complete 6 pages.

Here are some observations: Line breaks seem to happen at the same places. Instead all the vertical spaces seem to be a little bit larger in the file compiled on my own system. There is not a specific object that needs more space. Instead, it looks like every single line needs a bit more space. However, the font size itself is identical. Also the textwidth and textheight, as well as, the paper measures (letterpaper) seem to be the same.

Even switching between MikTex and TexLive on my local system does not solve the problem.

Since NeurIPS has strict page limits, it makes a crucial difference whether a file is half a page longer or not.

Any help is highly appreciated! Thanks!

  • I tried texlive 2020 and 2021 all I have easily available here and both gave the version with page 6 almost full, they were different even from the first page, the one I made being a line shorter, If someone has a syste that makes the pdf shown it should be easy to debug otherwise it's a bit tricky Commented May 25, 2021 at 19:50
  • 1
    oh you say you get the same as provided on overleaf? that's odd, what texlive version (as shown in the left sidebar) do you have in your overleaf project? Commented May 25, 2021 at 19:52
  • Overleaf uses TeX Live 2020, here is the first line of the overleaf log file: This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2020.9.10) 25 MAY 2021 19:54
    – Chris
    Commented May 25, 2021 at 19:55
  • 1
    I have an overleaf account I'll see what it does, my local texlive 2020 has all the updates during the year which they won't have done Commented May 25, 2021 at 19:57
  • 1
    No it is specifc to the odd way the class calls newgeometry. @UlrikeFischer and I are looking but you can do an immediate fix by putting \normalsize after \begin{document} Commented May 25, 2021 at 20:45

2 Answers 2


The package uses a slightly unusual calling of \newgeometry in a \AtBeginDocument that has (I think) been affected by the rationalisation of hook code in recent latex relases. You can instruct latex to apply this earlier so the baseline doesn't get over-written by changing line 128 of the package so it looks like

% set page geometry

where the \DeclareHookRule is for current latex, and the \ifx test is to skip that for older latex.

You could report this to the conference organisers.

  • Indeed, changing the packache neurips_2021.sty according to your suggestion seems to work. Thanks for spending your time, David and Ulrike!
    – Chris
    Commented May 25, 2021 at 21:21
  • Just to add this: the quickfix mentioned in the comments of the question, to add \normalsize right after \begin{document} perfectly works as well.
    – Chris
    Commented May 25, 2021 at 22:09
  • @Chris it does but a document is supposed to start out at \normalsize (that's the point of the command) so the conference organisers can't really document that people should do that, but they could modify the package as shown here (we try not to break things but sometimes packages need slight changes, to keep documents unchanged) it's hard to fix things without needing such adjustments sometimes, Commented May 25, 2021 at 22:17
  • That's true. From the perspective of the organizers, it's more natural to adjust the style file, from my perspective as author, it's more natural to adjust the document itself. I contacted the organizers, let's see what happens. Thanks again! :-)
    – Chris
    Commented May 25, 2021 at 22:29
  • I realized that the solution to modify the .sty file is also better for another reason: the strange geometry behavior seems to affect not only the baselineskip, but also other aspects like marginparwidth, which are not fixed by the \normalsize solution.
    – Chris
    Commented May 26, 2021 at 14:21

I don't have enough reputation to comment but as the author of the package I wanted to explain the rationale for \newgeometry in \AtBeginDocument – it was an attempt to foil authors from "cheating" and altering the page geometry in their preamble.

I will contact the program chairs and ask that the fix in the accepted answer be incorporated into the style file and pushed to the authors before the camera ready deadline.

(A moderator can feel free to convert this to a comment to the accepted answer.)

  • Thanks for the explanation and for incorporating the fix into the final version style file!
    – Chris
    Commented Aug 13, 2021 at 8:46
  • just saw this, thanks +1 Commented Oct 25, 2021 at 20:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .