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 currently using the the scrartcl document class and glossaries for acronyms:

\documentclass[12pt,a4paper,headsepline,notitlepage,parskip=half]{scrartcl} 
\usepackage[nonumberlist,acronym]{glossaries}

Further in the document I am using this

\section{Abkürzungen}
\glossarystyle{longheaderborder}
\printglossary[type=\acronymtype,title={}]

to have a numbered Section "Abkürzungen" in the table of contents. This works ok so far.

However the spacing between the Section "Abkürzungen" and the listing of the acronyms is too large. I reduce this spacing by using \vspace*{-15mm} but I think there must be a better way.

Is there a way to reduce the space after the section heading by the exact space which is normally used for spacing headers and text (I don't know how to achieve that in latex)?

Edit:

I think I wasn't clear enough on what I want to achieve:

For the section "Abkürzungen" only, the vspace is too large. For all other sections, scrartcl's vspace is fine.

I would like to reduce the vspace between the section heading and the text for just one section.

I know that by using an empty title \printglossary[type=\acronymtype,title={}] I effectively get an empty title (and it seems it is using the space even though it is empty), but I couldn't figure out how to put a title in \printglossary which is also visible as a numbered section in the table of contents.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Here's a way for switching between sections with tighter spacing and sections with normal spacing, done by redefing the \section command of scrartcl:

\documentclass{scrartcl}
\newcommand{\breaksection}[1]{#1\par\noindent}
\usepackage{letltxmacro}
\LetLtxMacro{\oldsection}{\section}
\makeatletter
\newcommand*{\smallsection}{
  \renewcommand{\section}{\@startsection{section}{1}{\z@}%
    {-3.5ex \@plus -1ex \@minus -.2ex}%
    {0ex}%
    {\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
      \setlength{\parfillskip}{\z@ plus 1fil}\fi
      \raggedsection\normalfont\sectfont\nobreak\size@section\breaksection}%
  }
}
\makeatother
\newcommand*{\stdsection}{\LetLtxMacro{\section}{\oldsection}}
\begin{document}
\section{One}
text
\smallsection
\section{Two}
text
\stdsection
\section{Three}
text
\end{document}

It copies the original definition from scrartcl but uses 0ex for the new space after the heading, which is 2.3ex \@plus.2ex by default. \breaksection is defined to get a paragraph break after the heading, without it you would get a run-in heading: a positive value causes a skip below, a negative value a run-in heading with that horizontal space.

share|improve this answer
    
Why didn't you redefine the 5th argument of \@startsection. A simple 1sp or other glue length are possible. –  Marco Daniel Dec 19 '11 at 17:22
    
@MarcoDaniel Just because the OP would like to "reduce ... by the exact space". One scaled point wouldn't make a visible difference, in that case \breaksection could be omitted. –  Stefan Kottwitz Dec 19 '11 at 17:44
    
I think I wasn't precise enough and I edited my question. Thanks for your answer so far (+1) –  tobsen Dec 20 '11 at 8:26
    
@tobsen could be done, I modified the code above. –  Stefan Kottwitz Dec 20 '11 at 8:45
    
@StefanKottwitz that did the trick, thank you very much indeed! –  tobsen Dec 20 '11 at 9:54
add comment

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.