# Customized odd and even headings with Koma-Script and a predefined first page

I want to create a document with KOMA Script and customized headings for odd/even pages and a predefined first page.

I tried the MWE below, but it seems that the rest of the even pages are affected by the definition of firstpage.

\documentclass{scrartcl}

\usepackage{scrlayer-scrpage}

% create new header for title page
\renewcommand*\titlepagestyle{firstpage}
\newpairofpagestyles{firstpage}{%
}

\cehead{center even pages (after 1st page) \headmark} % <=== THIS IS NOT WORKING

\usepackage{lipsum}

\title{Document Title}
\author{Document Author}
\date{}

\begin{document}

\maketitle

\lipsum[1-16]

\end{document}


Any help will be appreciated very much!

• Why don't you simply make the titlepage from scratch and avoid messing with page sryles? – Johannes_B Sep 5 '17 at 10:49
• Thanks Johannes_B, but I want to use the template for several documents. – Toño Sep 5 '17 at 10:50
• tex.stackexchange.com/questions/209993/… and the wikibooks page linked there. – Johannes_B Sep 5 '17 at 10:56
• Thanks, but my question is about headings in odd/even pages like in journal articles, i.e. with a predefined first page. – Toño Sep 5 '17 at 11:02

For the odd/even style to work out of the box, you need to specify the document option [twoside]:

\documentclass[twoside]{scrartcl}

\usepackage{scrlayer-scrpage}

% create new header for title page
\renewcommand*\titlepagestyle{firstpage}
\newpairofpagestyles{firstpage}{%
}

\cehead{center even pages (after 1st page) \headmark} % <=== THIS IS NOT WORKING

\usepackage{lipsum}

\title{Document Title}
\author{Document Author}
\date{}

\begin{document}

\maketitle

\lipsum[1-16]

\end{document}


Alternatively if you don't want to specify twoside you can use the \ifthispageodd macro provided by KOMA and use

\chead{\ifthispageodd{center odd pages \headmark}{center even pages (after

instead of \cehead and \cohead. Note that this needs two LaTeX-runs to be correct.
• That was it. The twosideoption is the answer. Thanks – Toño Sep 5 '17 at 11:28