6

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?

  • 2
    Hi Valeriy, and welcome to the site! – John Wickerson Jun 06 '13 at 07: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 06 '13 at 08: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 06 '13 at 09: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 06 '13 at 09: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: http://tex.stackexchange.com/questions/101545/different-vertical-spacing-parskip-between-concurrent-section-titles-and-parag/101944#101944 – Steven B. Segletes Jun 06 '13 at 09:49
  • To jmc: thanks; looks like a good idea, but will it work if a section starts with a table\float\whatever? It could appear in an appendix. – Valeriy Streltsov Jun 06 '13 at 11:26
  • To Charles: I'm looking for "own code for heads", something like \renewcommand{\chapter}{...} which will add the spaces depending on the previous occurred command. Is that possible? – Valeriy Streltsov Jun 06 '13 at 11:29
  • @ValeriyStreltsov, the only thing I can then think of is putting a tikzmark in every head, and let the next head check what the distance is to the previous head. But I think this is very demanding on resources… – jmc Jun 06 '13 at 19:58
  • With no clarification, this is 'unclear' as it stands. – Joseph Wright Aug 17 '13 at 18:59

0 Answers0