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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The space between headings and chapter or section titles is a frequently answered issue. But what if I want to keep that distance but reduce the space between heading and text on pages without a title?

I write my thesis using scrreprt and I am currently forced to squeeze two huge photographs and some text on one page. So I need to reduce the space between heading and text without changing the layout of pages that start with a chapter or section. Here is an example:

\documentclass[12pt,a4paper,oneside,notitlepage]{scrreprt}

\usepackage[utf8]{inputenc} 
\usepackage[ngerman]{babel} 
\usepackage[a4paper,left=35mm,right=25mm, top=35mm, bottom=25mm]{geometry} 

\usepackage[headsepline, plainheadsepline, automark]{scrpage2} 
\pagestyle{scrheadings} 
\chead[]{\headmark} 
\ohead[\pagemark]{\pagemark} 
\cfoot[]{}
\automark{chapter}
\setkomafont{pageheadfoot}{\footnotesize} 

\setlength{\headsep}{0.5cm} 
\renewcommand*\chapterheadstartvskip{\vspace{0cm}} 
\renewcommand*\chapterheadendvskip{\vspace{0.5cm}}

\begin{document}
\renewcommand*{\chapterpagestyle}{scrplain}
\chapter{A chapter}
some text

The distance to the heading is okay.
\newpage
\section{Another line}
here goes some text too.

The distance here is too small.
\newpage
This is the part I aimed for. It should be that close. 
\end{document}

As you can see changing headsep moves the section as far up as the normal text. I have tried the titlesec-package and some redefinitions like this (german golatex thread) without getting it back in its normal position but it seems impossible without changing back 'headsep'. But there must be a way to disconnect these two spaces, right? I would really appreciate some help and shared knowledge since I am fairly new to LaTeX.

share|improve this question

In your case a better approach would be not to redefine \headsep, but to add a manual \vspace*. The star is important here, otherwise a \vspace in the beginning (and also in the end) of a page would be without effect.

\documentclass[12pt,a4paper,oneside,notitlepage]{scrreprt}
\usepackage[utf8]{inputenc} 
\usepackage[ngerman]{babel} 
\usepackage[a4paper,left=35mm,right=25mm, top=35mm, bottom=25mm]{geometry} 

\usepackage[headsepline, plainheadsepline, automark]{scrpage2} 
\pagestyle{scrheadings} 
\chead[]{\headmark} 
\ohead[\pagemark]{\pagemark} 
\cfoot[]{}
\automark{chapter}
\setkomafont{pageheadfoot}{\footnotesize} 

\renewcommand*\chapterheadstartvskip{\vspace{0cm}} 
\renewcommand*\chapterheadendvskip{\vspace{0.5cm}}

\begin{document}
\renewcommand*{\chapterpagestyle}{scrplain}
\chapter{A chapter}
some text

The distance to the heading is okay.
\newpage
\section{Another line}
here goes some text too.

The distance here was too small, but is now according to the standard.
\newpage
\vspace*{-0.75cm}

This is the part I aimed for. It should be that close. 
\end{document}

After \vspace* the empty line could be left out, but for consistency I left it in, because after \vspace it would otherwise have an undesired effect.


Note, that meanwhile a successor for scrpage2 was published with version 3.12 of KOMA-Script: Its name is scrlayer-scrpage. It is downwards compatible to scrpage2, but fixes some pecularities and offers more opportunities.

share|improve this answer
    
I revisited the question today because it was not marked as answered. Your answer fixed the problem I described - thanks for that! I guess I waited for another solution, that changed the issue for all pages at once since I had to fix about 200 pages like that... – fortunecookies Apr 17 at 15:26

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.