# How to remove 'Chapter 1.' from 'Chapter 1. Introduction' while using \leftmark?

MWE is below:

\documentclass{report}
\usepackage{fancyhdr}
%\newcommand{\currentchapter}{}
%\let\oldchapter\chapter

%\renewcommand{\sectionmark}[1]{\markright{#1}}

\fancypagestyle{newstyle}{
\fancyhf{}
}
\begin{document}


I want to have

'Introduction'

in place of

'Chapter 1. Introduction'

as the header for my pages inside the document. So, is there a command set I can use instead of \leftmark to get the desired results? Or can I redefine \leftmark in any way to get the desired results?

• Would using \chapter*{Introduction} solve your problem? May 13 '13 at 17:23
• Can you please add more information for the example? What's the purpose of \currentchapter? May 13 '13 at 17:32

The problem with your current (re)definition of \chapter is that it removes the ability to use \chapter*{<title>} or \chapter[<ToC entry>]{<title>}. While this may not be a problem in your case, a general approach/solution would be preferred.

titleps provides built-in access to the titles of sectional units via \chaptertitle, \sectiontitle, etc.:

\documentclass[twoside]{report}
\usepackage{titleps,lipsum}% http://ctan.org/pkg/{titleps,lipsum}
\newpagestyle{newstyle}{
[]% even centre
[\thepage]% even right
{\thepage}% odd left
{}% odd centre
{\sectiontitle}% odd right
}

\pagestyle{newstyle}

\begin{document}

\chapter{Introduction}
\lipsum[1-10]

\section{A section}
\lipsum[2-20]

\end{document}


In fact, even though the above does not use fancyhdr, the switch to titleps is fairly straight forward. See titleps for fancyhdr users. The advantage should be obvious, since the interface provided by titleps is clear and avoids hacking into the page marks to extract content.

• Sorry Sorry !!! I was totally exhausted when I posted this question that I was in a hurry and I was not clear enough. I want to use the chapter name in the header and I know that \leftmark gives me the chapter name. but, it also gives me an unwanted word - the chapter number. I just want the chapter name and want to remove the chapter number from the command \leftmark. I have made come edit to the code that I posted above(it was actually the methods I tried to get this result) May 13 '13 at 17:59
• @newbie: But that's exactly what titleps provides in my answer. \chaptertitle gives only the chapter title (no number and no CHAPTER prefix). So no need to be sorry... May 13 '13 at 18:03
• Big thanks.. Thanks for the example pictures also.. LIFESAVER answer.. Works PERFECT May 13 '13 at 18:05
• This is exactly what I need except that I would like centered headers, where should I change the code? Jul 31 '15 at 21:46