0

I use

\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}

to achieve the goal stated in the question title. However I am not sure where I have to put it. I am using \include or \input to work on several parts of my .tex. Putting it in the preamble of the masterfile doesn't affect another included tex, but I also don't want to add the code above to every single .tex that I "\include". Another problem I have is that I am uncertain about whether this might affect other spacings I don't want to change.

4
  • This is strange - I don't have any code resseting code after it, but still does change apparently. Thank you though, I must be missing something!
    – manuel459
    Commented Mar 3, 2022 at 10:09
  • @DavidCarlisle I have found it to be working when the code above is put immediately after \begin{document}, but not working when put immediately before \begin{document}. Does \begin{document} reset the code?
    – manuel459
    Commented Mar 3, 2022 at 10:27
  • they are reset whenever you use \normalsize for example the expected behaviour is to define \normalsize to mach your spacing to match the font, it doesn't just set the font it sets display and list settings as well as baselineskip (\begin document does \normalsize) Commented Mar 3, 2022 at 11:15
  • Thank you very much :)
    – manuel459
    Commented Mar 3, 2022 at 11:34

1 Answer 1

2

These settings are not reset on \input or \include but are reset by most size change commands such as \normalsize or \large as these reset all the major spacing to be compatible with the requested size. Note in particular \begin{document} does \normalsize which for 10pt article is:

\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}

So if you are defining a class with tight spacing (or a package to modify the spacing of the sandard classes) you should redefine \normalsize rather than setting these lengths directly.

You must log in to answer this question.

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