Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using \Huge centered section headings but the space generated around the heading is too big currently:

enter image description here

I would like to reduce the space around the heading (The "Créé à son image" text) to make it more compact. Here is my current definition:

\renewcommand\thesection{\arabic{section}}
\titleformat{\section}[display]
  {\newpage\scshape\Huge} % format
  {\large\makedate{\thesection}~\chaphead} % label
  {10pt} %sep
  {\begin{center}} %before
  [\end{center}] %after

For the record, makedate a macro that puts the \up{er} on the number in "1er janvier", and \chaphead is a reference to the chapter name, "Janvier" in this case.

I have tried reducing the size from \Huge to \huge or even \LARGE. The font is reduced, but it still takes the same amount of space in the page.

share|improve this question
1  
I am impressed. You see it is easier than Perl:) –  Yiannis Lazarides Apr 12 '11 at 9:51
    
@Yiannis: I'd still argue. It's a matter of getting used to the language... –  ℝaphink Apr 21 '11 at 21:37

2 Answers 2

up vote 3 down vote accepted

You don't need to use a brute-force solution: the titlesec package provides a \titlespacing command to set these values properly:

\titlespacing*{⟨command⟩}{⟨left⟩}{⟨beforesep⟩}{⟨aftersep⟩}[⟨right⟩]

From the manual:

The starred version kills the indentation of the paragraph following the title, except in drop, wrap and runin where this possibility does not make sense.

  • ⟨left⟩ increases the left margin, except in the ...margin, and drop shape, where this parameter sets the title width, in wrap, the maximum width, and in runin, the indentation just before the title. With negative value the title overhangs.
  • ⟨beforesep⟩ is the vertical space before the title.
  • ⟨aftersep⟩ is the separation between title and text—vertical with hang, block, and display, and horizontal with runin, drop, wrap and ...margin. By making the value negative, you may define an effective space of less than \parskip.
  • The hang, block and display shapes have the possibility of increasing the ⟨right⟩ margin with this optional argument.
share|improve this answer
    
That works fine for the space after the title, but not for the space between "1er janvier" and "Créé à son image", because this space is part of the title. That said, your solution is cleaner. –  ℝaphink Apr 12 '11 at 13:15
    
This is nicer indeed. I knew there was some package around to achieve the desired effect, but I had never used it. –  doncherry Apr 12 '11 at 13:38
    
@Raphink This space is being introduced by the {center} environment in your \titleformat command. Try replacing your \begin{center} with \filcenter (and removing the \end{center}). –  Alan Munn Apr 12 '11 at 15:20
    
Even cleaner indeed. There's still a space though, so I have to keep a negative vspace before the \filcenter command and in \titlespacing, but it is better. –  ℝaphink Apr 12 '11 at 15:27

A kind of brute-force solution might be adding \vspace{-1cm} with some negative value before and after the heading (wherever you want to get rid of vertical space).

share|improve this answer
    
It's brute force indeed, but it does the trick. In effect, I tuned it with \vspace{-7mm} on top of the section, \vspace{-10mm} under it, and \vspace{-5mm} under the quote. Thank you. –  ℝaphink Apr 12 '11 at 9:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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