I'm trying to define a header style for my paper based on the scrartcl
class. After digging through some documentation I came along the scrpage2
package to create the headings. I get the layout as I want it, which is great, but I don't get the automark command. It puts in a heading, which is great, but it seems strange.
By strange I mean that it puts Contents as the header for Contents, which is what I expect, but on the next page (notice the \vfill
and \pagebreak
) it puts 3 Third as the heading, which is not what I expected.
I expect it to put the very first section or subsection it finds on a page in the header.
Have I misunderstood how the automark command works or do I need to put in extra options? (Like \automark[subsection]{section}
)
EDIT: Double weird: it works when I replace all \sections
in the example with a \blinddocument
. I'm sorry I am so unclear, though, I just have no clue at all.
\documentclass[twoside,titlepage=true]{scrartcl}
\usepackage[]{geometry}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[automark]{scrpage2} % This should be set AFTER setting up the page geometry
\pagestyle{scrheadings}
\begin{document}
\title{A Minimal Working Example}
\author{Zsub}
\maketitle
\tableofcontents
\vfill
\pagebreak
\section{First}
\blindtext[2]
\section{Second}
\blindtext[2]
\section{Third}
\blindtext[2]
\section{Fourth}
\blindtext[2]
\subsection{First of Fourth}
\blindtext[1]
\section{Fifth}
\blindtext[2]
\section{Sixth}
\blindtext[2]
\end{document}
P.S. It's been a few years since I last used latex and a bit of a struggle to get re-acquainted, but my classmates are already jealous of the layout. So thanks for the help, everyone!