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'm using titlesec to set my page style in a book class. If I include an appendix, the header corresponding to the first chapter is "Appendix 1" instead of "Chapter 1".

\documentclass{book}

\usepackage[pagestyles]{titlesec}  
\newpagestyle{main}[\scshape]{%
  \sethead
  [\thepage][][\chaptertitlename\space\thechapter. \chaptertitle]
  {\ifthesection{\thesection\space\,\sectiontitle}
  {\chaptertitlename\space\thechapter. \chaptertitle}}{}{\thepage}
}
\pagestyle{main}
\usepackage{lipsum}

\begin{document}

\chapter{Foo}
\lipsum

\appendix
\chapter{Bar}
\lipsum

\end{document}
share|improve this question

2 Answers 2

up vote 4 down vote accepted

Just add \cleardoublepage before \appendix; probably a bad interaction between titlesec and the class.

\documentclass{book}

\usepackage[pagestyles]{titlesec}  
\newpagestyle{main}[\scshape]{%
  \sethead
  [\thepage][][\chaptertitlename\space\thechapter. \chaptertitle]
  {\ifthesection{\thesection\space\,\sectiontitle}
  {\chaptertitlename\space\thechapter. \chaptertitle}}{}{\thepage}
}
\pagestyle{main}
\usepackage{lipsum}

\begin{document}

\chapter{Foo}
\lipsum

\cleardoublepage
\appendix

\chapter{Bar}
\lipsum

\end{document}
share|improve this answer

titlesec/titleps doesn't set \chaptertitlename as a "marked" command. Perhaps it should. For the time being, just write:

\newtitlemark{\chaptertitlename}
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.