I'm writing a LaTeX class for my bachelor's thesis. My university's standard says that there should be a space after headers:

  • 2cm if there's text after the header
  • 1.3cm if there's another header after it (for example, subsequent section and subsection headers).

For now I've set 2cm space after all headers (in the class file) and adding \vspace{-7mm} between subsequent headers (manually, in the document). Is there a way to make it automatically, i.e. some kind of "conditional spacing" if the last command was a header?

closed as unclear what you're asking by Joseph Wright Aug 17 '13 at 18:58

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Hi Valeriy, and welcome to the site! – John Wickerson Jun 6 '13 at 7:41
  • My first try would be: Set the default space to 13mm, and look into the code that prevents the first paragraph from indenting; then add another 7mm space there. – jmc Jun 6 '13 at 8:11
  • 3
    A point of terminology: you are talking about heads (chapter, section, etc...), not headers (the line that appears at the top of each page, like the footers that appear at the bottom of each page). – Charles Stewart Jun 6 '13 at 9:03
  • 1
    It's not clear to me what a useful answer would look like: do you want to know how to detect this case so you can go off and implement your own code for heads? Or do you want to know how to modify an existing class file to do what you want? If the latter, which class file are you working with? – Charles Stewart Jun 6 '13 at 9:05
  • As Charles Stewart said, it depends on what class/method you are trying. If, for example, you are using the titlesec package, here was a questiont that looked at that issue: tex.stackexchange.com/questions/101545/… – Steven B. Segletes Jun 6 '13 at 9:49