0

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

documentclass[openright,twoside,a4paper,12pt,headsepline]{scrartcl}

\usepackage{microtype}

\usepackage{graphicx}

\usepackage{amsmath}
\numberwithin{equation}{subsection}

\usepackage[utf8]{inputenc}
\usepackage{ngerman}
\usepackage[ngerman]{babel}

\usepackage[T1]{fontenc}

\usepackage{lmodern}
\usepackage{fix-cm}

\usepackage{longtable}


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

\usepackage{fancybox}

\usepackage[hyphens,obeyspaces,spaces]{url}

\usepackage{color}

\usepackage{amssymb}

\usepackage{pdflscape}

\usepackage{fancyvrb}

\input{latex_einstellungen/variablen}

\usepackage[bookmarksnumbered,pdftitle={\titleDocument},hyperfootnotes=false]{hyperref} 

\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

\usepackage{array}

\frenchspacing

\usepackage{setspace}

\usepackage{capt-of}

\usepackage{makeidx}

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

\usepackage{hyperref}

\begin{document}
    \input{latex_einstellungen/trennung}

    \include{titlepage}

    \onehalfspacing

    \include{abstract}

    \singlespacing

    \newpage
    \tableofcontents

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

    \onehalfspacing

    \input{1_einleitung}

    \input{2_grundlagen}

    \input{3_entwicklung_strategie}

    \input{4_training}

    \input{5_evaluierung}

    \input{6_fazit_ausblick}

    \onecolumn
    \singlespacing
    \newpage
    \addcontentsline{toc}{section}{Literaturverzeichnis}
    \renewcommand\refname{Literaturverzeichnis}
    \bibliographystyle{alphadin}
    \bibliography{bibliography}

    \onehalfspacing
    \newpage
    \addcontentsline{toc}{section}{Anhang}
    \fancyhead[L]{Anhang} %Kopfzeile links
    \input{anhang/anhang}

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

    \newpage
    \thispagestyle{empty
    \section*{ }

\end{document}
2
  • 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

0
\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.

1
  • @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.