# Changing the default markup of fancyhdr headers

I am trying to add a header to my pages and in doing so I ran into the problem of not being able to change the default markup of fancyhdr headers. More specifically, I want the header of every page to include the subsection and section without numberings and in regular text, so no italics or capitals.

The following MWE illustrates my problem.

\documentclass[10pt]{article}

\usepackage{fancyhdr}
\pagestyle{fancy}

\begin{document}

\section{Section}

0

\subsection{Subsection}

1

\newpage

2

\end{document}


The first page's header does not show the title of the subsection,

whereas the second page does.

Both however have (sub)section numberings and sport markup. I would like them to look like this:

I have tried renewing the appropriate commands which did not do me much good.

Any help is appreciated!

Using this answer I solved the problem in this way:

\documentclass[10pt]{article}

\usepackage{fancyhdr}
\pagestyle{fancy}

\let\Sectionmark\sectionmark
\def\sectionmark#1{\def\Sectionname{#1}\Sectionmark{#1}}
\let\Subsectionmark\subsectionmark
\def\subsectionmark#1{\def\Subsectionname{#1}\Subsectionmark{#1}}
\let\Subsubsectionmark\subsubsectionmark
\def\subsubsectionmark#1{\def\Subsubsectionname{#1}\Subsubsectionmark{#1}}

\begin{document}

\section{Section}

0

\subsection{Subsection}

1

\newpage

2

\end{document}