I have two sections on one page. Unfortunately fancyhdr
takes the second one as the page header, which will result in something like seen in the image below.
I want to have the first section as the header title (in this case: Introduction).
Here is the code for the above image:
\documentclass[12pt, oneside]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{\fancyplain{}{\leftmark }}
\rhead{}
\usepackage{lipsum} %only for dummy text
\begin{document}
\section{Introduction}
\lipsum[2]
\section{Overview}
\lipsum[2]
\end{document}