I have got two questions and would be extremely grateful for any help (especially with the first question)!
Question 1: I am using the article class and would like the section title (including section number) to appear on the LEFT; additionally, on pages belonging to a subsection, the subsection title (excluding number) should be printed on the RIGHT.
To create the header I used the following code:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\pagestyle{fancy}
\fancyhf{}
\rhead{\rightmark}
\lhead{\sectionmark}
\rfoot{\centering \thepage}
\begin{document}
\section{Introduction}
\section{Chapter 2}
\subsection{A subsection}
\subsection{Another subsection}
\section{Chapter 3}
\subsection{First subsection in Chapter 3}
\subsection{Another subsection in Chapter 3}
\section{Conclusion}
\end{document}
The problem is that with this code, the left-hand header is empty and the right-hand header gives the subsection title (if a subsection exists) and otherwise it gives the section title.
I would be very grateful if someone would show me how to get the desired header, described above!
Question 2: I don't want the header to appear on the first page of a new section. Is there anything one could include in the preamble to achieve this, instead of having to add \thispagestyle{empty}in the code underneath each \sectioncommand?
Many thanks in advance! :)
articleis one-sided and only the odd (right hand) page style is used, you need[twoside]to enable left and right pages to be styled differently. – David Carlisle Sep 22 '17 at 15:57