3

I want a consistent spacing between the top of the page and the table-of-content-title/ chapter-titles throughout my document. However, in two-column mode, it appears that the space between the top of the page and chapter-title is a little bit smaller than the space between the top of the page and the table-of-content-title:

enter image description here

In one-column mode, the spacing is always the same. How can I keep the spacing equal in two-column mode?

MWE:

\documentclass[11pt, openany]{scrbook}
\usepackage{lipsum}

\begin{document}
\tableofcontents

\twocolumn % Comment this out and the spaces become right again

\chapter{Test Chapter}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 

\end{document}
2

There is a vertical space missing before the chapter-titles. But there is the same problem with the standard classes, see this entry in the LaTeX bugs database.

As a workaround with KOMA-Script versions 3.16 or newer (3.17a is the current version on CTAN) you could use

\makeatletter
\renewcommand*{\chapterheadstartvskip}{\vspace{\topskip}\vspace{\@tempskipa}}
\BeforeTOCHead{\renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}}
\makeatother

enter image description here

Code (without the grid):

\documentclass[open=any,
  twocolumn
]{scrbook}[2015/02/07]
\usepackage{showframe}
\makeatletter
\renewcommand*{\chapterheadstartvskip}{\vspace{\topskip}\vspace{\@tempskipa}}
\BeforeTOCHead{\renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}}
\makeatother
\begin{document}
\tableofcontents
\chapter{Test Chapter}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
\KOMAScriptVersion
\end{document}

And as reference: The same code without twocolumn and without the workaround

\documentclass[open=any,
  %twocolumn
]{scrbook}[2015/02/07]
\usepackage{showframe}
%\makeatletter
%\renewcommand*{\chapterheadstartvskip}{\vspace{\topskip}\vspace{\@tempskipa}}
%\BeforeTOCHead{\renewcommand*{\chapterheadstartvskip}{\vspace{\@tempskipa}}}
%\makeatother
\begin{document}
\tableofcontents
\chapter{Test Chapter}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
\KOMAScriptVersion
\end{document}

results in

enter image description here


Update

If you want to switch between twocolumn and onecolumn inside the document you could use something like

\documentclass[open=any,
  twocolumn
]{scrbook}[2015/02/07]
\usepackage{showframe}

\makeatletter
\newcommand*\tcchapterheadstartvskip{\vspace{\topskip}\vspace{\@tempskipa}}
\newcommand*\occhapterheadstartvskip{\vspace{\@tempskipa}}
\makeatother
\renewcommand*{\chapterheadstartvskip}{\tcchapterheadstartvskip}
\BeforeTOCHead{\renewcommand*{\chapterheadstartvskip}{\occhapterheadstartvskip}}

\newcommand\mytwocolumn{%
  \KOMAoptions{twocolumn=true}%
  \renewcommand*{\chapterheadstartvskip}{\tcchapterheadstartvskip}%
}
\newcommand\myonecolumn{%
  \KOMAoptions{twocolumn=false}%
  \renewcommand*{\chapterheadstartvskip}{\occhapterheadstartvskip}%
}

\begin{document}
\tableofcontents
\chapter{Test Chapter}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
\KOMAScriptVersion

\clearpage
\myonecolumn
\chapter{Test Chapter}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 

\clearpage
\mytwocolumn
\chapter{Test Chapter}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
\end{document}

enter image description here

Note, the definiton of \tcchapterheadstartvskip have to be changed if the parskip Option is used.

With parskip or parskip=full:

\newcommand*\tcchapterheadstartvskip{\vspace{\topskip}\vspace{\baselineskip}\vspace{\@tempskipa}}

And with parskip=half:

\newcommand*\tcchapterheadstartvskip{\vspace{\topskip}\vspace{.5\baselineskip}\vspace{\@tempskipa}}
  • Thank you for your help. However, I have noticed that the same wrong spacing appears also for the bibliography. – klopps May 12 '15 at 23:24
  • @klopps There is no bibliography in your MWE. Nevertheless maybe my updated answer will help. – esdd May 13 '15 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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