Is there a way for the header to only print the title of the parent section? So in the example below, the subsection{LOL} page will have "1.1 LOL" written in the header. I just want it to say "Introduction" which is the parent section.
\documentclass[a4paper,12pt]{scrartcl}
\usepackage{fancyhdr}
\begin{document}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhf{}
\rhead{\fancyplain{}{MyName}} % predefined ()
\lhead{\fancyplain{}{\rightmark }} % 1. sectionname
\cfoot{\fancyplain{}{\thepage}}
\section{Introduction}
\newpage
\subsection{LOL}
\end{document}
Best Answer
Either you also redefine
\subsectionmark
or use the\leftmark
; in article type classes,\subsection
emits a\markright
command.Note also the "modern"
fancyhdr
syntax that avoids\fancyplain
.