I am trying to get the twoside-option for documentclass to work. But I am facing a couple of problems:

  1. There is no empty page after the title page
  2. while the spacing does alternate between left and right, the page numbering does not

I have no clue where the problem might be, if more information is needed let me know









\geometry{left=3.5cm, right=2cm, top=2.5cm, bottom=2cm}









\usepackage{fancyhdr} %Paket laden
\pagestyle{fancy} %eigener Seitenstil
\fancyhf{} %alle Kopf- und Fußzeilenfelder bereinigen
\fancyhead[L]{\nouppercase{\leftmark}} %Kopfzeile links
\fancyhead[C]{} %zentrierte Kopfzeile
\fancyhead[R]{\thepage} %Kopfzeile rechts
\renewcommand{\headrulewidth}{0.4pt} %obere Trennlinie






\lstset{numbers=left, numberstyle=\tiny, numbersep=5pt, keywordstyle=\color{black}\bfseries, stringstyle=\ttfamily,showstringspaces=false,basicstyle=\footnotesize,captionpos=b}








    \fancyhead[L]{\nouppercase{\leftmark}} %Kopfzeile links









    \fancyhead[L]{Anhang} %Kopfzeile links

    \addcontentsline{toc}{section}{Eidesstattliche Erklärung}

    \section*{ }

  • 2
    no one can run your example to see your issue as it includes files not provide, it is far more useful to make a small self contained example that shows the issue. I don't know scrartcl that well but I suspect that you should be using its build in support for setting the page head rather than using fancyhdr but \fancyhead[R]{\thepage} %Kopfzeile rechts is putting the page number at the right hand side of all pages. Sep 26, 2019 at 21:44
  • yea, I am a bit pressed for time right now, so I was hoping someone could figure out by the preamble, which you did! With that hint I was able to find the answer by myself (using the options LO, RE for \fancyhead to toggle the pages). Thanks a lot! (if you would like to turn that into an answer, feel free to do so, I will mark it as correct) Sep 26, 2019 at 21:59

1 Answer 1

\fancyhead[R]{\thepage} %Kopfzeile rechts 

is putting the page number at the right hand side of all pages.

you can use LO to specify left on odd pages, RO, RE etc.

Note also that the koma-script classes have their own facilities for page headings and (I think) fancyhdr is not recommended here, although it should work in most cases.

  • @barbarabeeton er yes, You could edit it:-) thanks, I'll fix. Sep 27, 2019 at 16:11

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.