1

I have generated a customized section heading style as follows:

\newcommand\ueber[1]{\vspace{0.2cm}\normalsize\itshape #1 \vspace{0.05cm}\normalfont}

So far, it works fine. However, I don't know how I can add "glue", so that the heading doesn't ever get separated from the subsequent paragraph when it appears at the end of a page. How can I add glue?

Many thanks in advance!

  • Welcome to TeX SX! Yu should take a look at the titlesec documentation, in particular, you might be inerested in the nobottomtitles option (§ 3.3 Spacing related tools). – Bernard Sep 4 '18 at 13:09
  • glue is tex word for space so you have added that already you want a penalty so #1\par\nopagebreak\vspace{0.05cm}\normalfont although using a latex heading would be better. – David Carlisle Sep 4 '18 at 13:16
1

glue is tex word for space so you have added that already you want a penalty so #1\par\nopagebreak\vspace{0.05cm}\normalfont although using a latex heading would be better.

\newcommand\ueber[1]{%
  \par\vspace{0.2cm}%
  \normalsize\normalfont\itshape #1%
  \par\nopagebreak \vspace{0.05cm}%
  \normalfont}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.