4

I have a twoside document book and I want just to show on the even pages the number of the chapter and the chapter without chapter word. I want it to apper: 6. ¿QUE ES LA NORMA ISO 27001?

header figure

My code is this one:

   \fancyhf{}

    \fancyhead[LE]{\textsl{\slshape{\leftmark}}}

    \fancyhead[RO]{\textsl{PROYECTO FIN DE MASTER}}

    \fancyfoot[LE,RO]{\thepage}

    \renewcommand{\headrulewidth}{0.4pt}

    \renewcommand{\footrulewidth}{0.4pt}
2
  • What \documentclass are you using?
    – Werner
    Dec 17 '14 at 23:38
  • \documentclass[a4paper,10pt,twoside]{book}
    – Jon
    Dec 17 '14 at 23:39
5

You could just patch \chaptermark to remove the inserted \@chapapp\ :

enter image description here

\documentclass[twoside]{book}
\usepackage[spanish]{babel}
\usepackage{fancyhdr,lipsum}
\fancyhf{}
\fancyhead[LE]{\slshape \leftmark}
\fancyhead[RO]{\slshape PROYECTO FIN DE MASTER}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}

\usepackage{etoolbox}
\makeatletter
%\ patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\chaptermark}{\@chapapp\ }{}{}{}
\makeatother

\begin{document}

\chapter{A chapter}
\lipsum[1-50]

\end{document}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.