Fix overfull problems when too many consecutive empty sections in Latex

I’m using Doxygen to document some C source code. This tool generates multiple sections in the Latex document (one for each variable). These sections are empty (i.e. they only have a title, no text). The problem is that Latex doesn’t automatically break the page when it should, and the section titles go beyond the margins (in fact many titles are not displayed at all).

To solve the issue add the following code to the document’s preamble:

1
2
3
\makeatletter
\renewcommand\@afterheading{}
\makeatother

Share this post:

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
Related posts:
  1. Visual Studio Doxygen Latex and encoding problems
  2. Conditional compilation in Latex
  3. Define macros in Latex
  4. Indent first paragraph of the section in Latex
  5. Source code snippets in Latex

Leave a Reply