0

I use ACM template in this page to write my thesis. There is a huge blank space between sections as the figure demonstrate. I have refer to this post and use input{} to input sections, but the blank still exist, any suggestion?

I have reproduce my problem in this overleaf link, hope this can help.

Normally it will only have 2 blank space between section, but in my reproduce file, there is 3 or more blank line between section.

Normal output: enter image description here

Reproduced error output:

enter image description here

9
  • That image does not explain much, exactly what are in these files that are inputted? Not that since you are using \input here, you can collect everything in one file and post it here. That makes it a lot easier for us to work with
    – daleif
    Jul 26, 2021 at 11:16
  • Is this better now?
    – S.F. Yeh
    Jul 26, 2021 at 11:56
  • 1
    Well, next make the sniplet into something others can test directly, here there is no document class or relevant packages. The collored image from overleaf is not really relevant.
    – daleif
    Jul 26, 2021 at 12:03
  • but My latex just look like this lol. I use one file and code input{} to call out other .tex and the I format the content in the way I demonstrated
    – S.F. Yeh
    Jul 26, 2021 at 12:47
  • I'm sure that if you open an overleaf template there will be some files at the right of you screen. In there you will see a class (.cls file) or something containing relevant definitions. Without those definitions it is imposible to know what is going on, and that's the meaning of "next time make the snipet into something others can test directly". None of your snipers can be tested by others and we don't know which ACM template are you using, so it is imposible to help Jul 26, 2021 at 12:59

1 Answer 1

3

TeX is trying to fill the page to the best of its ability.

The acmart class puts glue (elastic space) before and after the section title to allow a good break in the text when filling the page.

You can reduce the allowed (+)vertical space by redefining the command \section.

Then, in this case, the white space will appear at the bottom of the page because the next page begins with a subsection and obviously does not fit there.

The change will take effect throughout the document.

For consistency, it will be better to do the same, at least, with subsections.

Before

a

After

b

Add the code to your preamble:

\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
    {-.75\baselineskip \@plus -.2\p@ \@minus -.2\p@}% before \@plus -2\p@ <<<
    {.25\baselineskip}%
    {\ACM@NRadjust\@secfont}}

\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
    {-.75\baselineskip \@plus -.2\p@ \@minus -.2\p@}% before \@plus -2\p@<<<
    {.25\baselineskip}%
    {\ACM@NRadjust\@subsecfont}}

\makeatother
1
  • thank you, but modify the section format is not allowed for paper submission. (sad
    – S.F. Yeh
    Aug 31, 2021 at 2:42

You must log in to answer this question.

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