[Tex/LaTex] How to flip even/odd page style

double-sidedkoma-script

I write a document that is to be printed 2-on-1 (on A4 paper) so double-sided layouts seem reasonable, e.g. for margins. Therefore, I use scrartcl with twoside.

My problem is that this assumes that odd pages are on the right and even on the left. This is reasonable when printing leaflets (i.e. first page is cover) but that is not the case for me.

Therefore, I want to flip everything. Is there an easy way to do this?

Best Answer

Let's suppose that your document is like this one, with also headings and footers:

\documentclass[twoside]{scrartcl}

\usepackage{lipsum} % only for the example

\usepackage[automark]{scrlayer-scrpage}

\pagestyle{scrheadings}

\begin{document}

\section{Test}

\lipsum[1-4]

\subsection{A subsection}

\lipsum[1-8]

\end{document} 

with this output:

enter image description here

To flip the margins, you can do:

\let\tempmargin\oddsidemargin
\let\oddsidemargin\evensidemargin
\let\evensidemargin\tempmargin

To also flip the margin pars, the following line is required

\reversemarginpar

To flip headers and footers, it is necessary to build a new style that flips everything and then use this style:

\defpagestyle{mystyle}{%
{\hfill\headmark}{\headmark\hfill}{\hfill}
}{%
{\hfill\pagemark}{\pagemark\hfill}{\hfill}
}

\pagestyle{mystyle}

The following MWE

\documentclass[twoside]{scrartcl}

\usepackage{lipsum} % only for the example

\usepackage[automark]{scrlayer-scrpage}

\defpagestyle{mystyle}{%
{\hfill\headmark}{\headmark\hfill}{\hfill}
}{%
{\hfill\pagemark}{\pagemark\hfill}{\hfill}
}

\pagestyle{mystyle}

\let\tempmargin\oddsidemargin
\let\oddsidemargin\evensidemargin
\let\evensidemargin\tempmargin
\reversemarginpar

\begin{document}

\section{Test}

\lipsum[1-4]

\subsection{A subsection}

\lipsum[1-8]

\end{document} 

should give you exactly what you want:

enter image description here