I know there are related questions, but I am still not getting it to work.
I have a long document with 3 chapters, and in each chapter, there are sections such as "1.2.3" for Chapter 1, section 2.3.
I need the chapters to appear on even pages, on the right. The section (only the first level, i.e. 1.2) needs to appear odd pages, on the left.
I used the following code:
\documentclass[DIV12, a4paper, 12pt, listof=totocnumbered, bibliography=totoc]{book}
\title{Dissertation}
\author{xx}
\usepackage{a4wide}
\usepackage{datetime}
\usepackage{lscape}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[onehalfspacing]{setspace}
\usepackage{float, afterpage, rotating, graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz, epstopdf,pgfplots}
\usepackage{longtable, booktabs, tabularx}
\usepackage{fancyvrb, moreverb, relsize}
\usepackage{eurosym, calc, chngcntr}
\usepackage{amsmath, amssymb, amsfonts, amsthm, bm}
\usepackage{mathtools}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\usepackage[skip=5pt]{caption} %add labelfont={bf} as option to make 'Table 1.x' or 'Figure 3.x' bold (but not rest of caption)
\usepackage{mdwlist}
\usepackage{xfrac}
\DeclareUnicodeCharacter{FB01}{fi}
\DeclareUnicodeCharacter{FB02}{fl}
\usepackage{setspace,geometry}
\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{upgreek}
\usepackage{afterpage}
\usepackage{wrapfig}
\usepackage{multirow, makecell}
%\usepackage{fancyhdr}
\usepackage[toc]{glossaries}
\usepackage{subcaption}
%\usepackage{lipsum}
\usepackage{eurosym}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{tabularx}
%\usepackage{abstract}
\usepackage{graphicx}
\usepackage[hyphens]{url}
\usepackage{acronym}
\usepackage[english]{babel}
\usepackage[round]{natbib}
\usepackage[nottoc]{tocbibind}
\usepackage{pdfpages}
\newdateformat{monthyeardate}{%
\monthname[\THEMONTH], \THEYEAR}
\geometry{a4paper, headsep=0.6cm, left=33mm, right=33mm, top=25mm, bottom=20mm} %headsep verschiebt die Kopfzeile (Standard ist etwa bei 1cm)
% Kopfzeile anpassen
\usepackage[autooneside=false,headsepline]{scrlayer-scrpage}% Default headsepline width = 0.4pt
\automark[subsection]{section}
\clearscrheadfoot
\cfoot[\pagemark]{\pagemark}
\ohead{\ifstr{\rightbotmark}{\leftmark}{}{\rightbotmark}}
\ihead{\MakeTextUppercase{\leftmark}}
\begin{document}
\chapter{Test Chapter}
\section{Test Section}
\subsection{Test Subsection}
xxxxxxxx
\clearpage
xxxxxxxxx
\clearpage
xxxxxxxxx
\clearpage
xxxxxxxxx
\end{document}

\clearscrheadings \clearscrplain \ihead[\headmark]{\headmark} \cfoot[\thepage]{\pagemark} \pagestyle{scrheadings}give the desired result? – leandriis Feb 27 '20 at 21:20\clearscrheadfootis a short version of\clearscrheadings\clearscrplain. These three commands are outdated. They should be replaced by\clearpairofpagestylesand\clearmainofpairofpagestyles\clearplainofpairofpagestyles. – esdd Feb 27 '20 at 22:55