0

Using KOMA-script I have problems with a twosided document. I want my sections to start on an odd page, so i use \cleardoublepage before starting the next section. I want the section title to be displayed in the right headline and the subsection title displayed in the left headline.

Whenever a section ends on an odd page everything works fine, one empty page is added and the sections starts on the next odd page with the correct pagestyle. But it blows up when a section ends on an even side. The new section correctly starts on the next odd page without an additional blank page but it has the wrong pagestyle and no headers at all.

\documentclass[a4paper,11pt,headsepline=true,twoside=true]{scrartcl}

\usepackage{scrpage2}
\pagestyle{scrheadings}
\setheadsepline{1pt}

\rohead{\leftmark}
\lehead{\rightmark}
\automark[subsection]{section}
\usepackage{lipsum}

%Dokument
\begin{document}
\section{test}
blah blah blah
\cleardoublepage
\section{test2}
\lipsum
\cleardoublepage
\section{test3}
\lipsum
\end{document}

Headers are shown on the page where section test2 starts but not on the page where section test3 starts.

What goes wrong here?

8
  • If I get it right the problem should be that in your MWE the headers of page 5 with section "test3" are missing because the section before ends on an even page?
    – Quincy
    Mar 27, 2013 at 17:51
  • Are you sure that the documentclass scrartcl is the correct choise. I think you should use scrbook! Mar 27, 2013 at 18:59
  • On odd numbered pages you want the \leftmark, which is empty, because no \chapter command has set it.
    – egreg
    Mar 27, 2013 at 21:17
  • In your example, section "test3" starts at page 5 which features the correct heading.
    – lockstep
    Mar 27, 2013 at 22:00
  • When I compile the above example on my computers "test3" starts on page 5 but shows no heading at all in contrast to "test2" on page 3, which does. Kubuntu 12.04 and Linux Mint 13... Both featuring very old TeXlive-Distributions (2009). What version are you using @lockstep?
    – Sunday
    Mar 27, 2013 at 22:08

1 Answer 1

1

This appears to be a bug in an old version of KOMA-script. It is mentioned on http://www.komascript.de/release3.06 (german, last item on the page) to be the case for the 3.06 release from July 2010 and the problem seems to exist since 3.01a from November 2008. I found no mention of a bugfix in one of the changelogs after 3.06 but it still seems to be fixed in the current version.

The aforementioned release notes proposes to add \thispagestyle{...} after \cleardoublepage. This solves the problem, at least in TexLive 2009.

1
  • Actually komascript.de/release3.06 states that it should be fixed in the next release which would have been 3.07 from September 2010.
    – Sunday
    Mar 27, 2013 at 22:26

Not the answer you're looking for? Browse other questions tagged .