# How to print the section name without the section number in a fancyhdr header?

I've copied a code to have a header that prints the section name on the left and my name on the right:

\usepackage{fancyhdr}

\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}

\fancyhf{}

\cfoot{\fancyplain{}{\thepage}}


The problem is that it prints the section number as well, which I don't want. I've experimented with removing the 1's in the code but that doesn't work.

• Please make your code compilable, starting with \documentclass{...} and ending with \end{document}. – jub0bs Apr 29 '13 at 11:16
• Thanks Jubobs, that is indeed the solution. I don' tknow how to mark it as the answer – Blackstone Apr 29 '13 at 11:24

\thesection prints the section number (preceded by the chapter number, if you use a class that can include chapters, such as book). Get rid of it and of the following control space (\) and you obtain the desired output:

\documentclass{book}

\usepackage{fancyhdr}
\usepackage{lipsum}

\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhf{}