Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using \fancyhdr package for the headings and report as a document class samplecode is given below

\documentclass[a4paper,11pt]{report} 
\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}


\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}
\fancyhf{}
\fancyhead[LE,LO]{\slshape \leftmark}
\rhead{\thepage}
\cfoot{}

\begin{document}
\pagenumbering{arabic}

\input{chap_01}
\input{chap_02}
\input{chap_03}

\begin{appendices}

\input{Appendix_01}
\end{appendices}
\end{document}

Now everything seems to be working but on the appendix page i get: enter image description here

where as instead of chapter i would like 'Appendix A. Parameter Definition'.

Suggestions?

share|improve this question

2 Answers 2

up vote 9 down vote accepted

You can simply put the line

\renewcommand\chaptername{Appendix}

just after the line

\begin{appendices}

enter image description here

Sample document:

\documentclass[a4paper,11pt]{report}
\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}


\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}
\fancyhf{}
\fancyhead[LE,LO]{\slshape \leftmark}
\rhead{\thepage}
\cfoot{}

\begin{document}
\pagenumbering{arabic}

\begin{appendices}

\renewcommand\chaptername{Appendix}

\chapter{Parameter Definition}
\newpage
\setcounter{page}{35}
some text
\end{appendices}
\end{document} 
share|improve this answer
    
but shouldn't that be part of the appendices routine? –  barbara beeton Dec 23 '13 at 20:13
    
@barbarabeeton If the OP didn't change the meaning of \chaptermark this would have been automatic. –  karlkoeller Dec 23 '13 at 20:19
    
aha! i spaced through that. thanks for pointing it out. –  barbara beeton Dec 23 '13 at 20:21

LaTeX already has a method for changing between \chaptername and \appendixname; the command \@chapapp usually expands to \chaptername but is redefined to mean \appendixname after \appendix.

I have removed from your example something that's not needed.

\documentclass[a4paper,11pt]{report}

\usepackage{kantlipsum} % just for the example

\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\slshape \leftmark}
\fancyhead[R]{\thepage}
\makeatletter % necessary for using \@chapapp
\renewcommand{\chaptermark}[1]{%
  \markboth{\@chapapp\ \thechapter.\ #1}{}}
\makeatother

\begin{document}
\pagenumbering{arabic}

\chapter{One}
\kant

\chapter{Two}
\kant


\begin{appendices}

\chapter{Again}
\kant

\end{appendices}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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