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 the documentclass toptesi by Claudio Beccari for writing my master thesis.
This class automatically produce a header, with chapter title on the even pages and section title on the odd pages.
My problem is that when I have to write the appendix I only have a title for the chapter and not for the section (no section needed), and so the result is an empty header. Is it a typo or is it right?
If is not right, what solution can I use to fix it? Like printing the same title (or none) on both pages. Here is an example of the code:

\documentclass[ 12pt, twoside]{toptesi}
\usepackage{lipsum}
\usepackage[toc,page]{appendix}
\begin{document}
\english
\indici
\chapter{First chapter}
\lipsum[1-13]
\begin{appendices}
\chapter{First appendix}
\lipsum[1-12]
\end{appendices}
\end{document}
share|improve this question
    
Could you provide link where this toptesi class is available? –  Christian Hupfer Jun 9 at 10:00
    
here it is the link –  maximator Jun 9 at 10:07
    
@ChristianHupfer toptesi is available on both TeX Live and MiKTeX. –  egreg Jun 9 at 12:42
    
@egreg: I have already detected it there, thanks –  Christian Hupfer Jun 9 at 12:43

1 Answer 1

up vote 5 down vote accepted

Redefine \chaptermark in the appendices environment to set both the left and the right marks.

\documentclass[12pt,twoside]{toptesi}
\usepackage{kantlipsum}
\usepackage[toc,page]{appendix}
\begin{document}
\english
\indici
\chapter{First chapter}
\section{First section}
\kant
\begin{appendices}
\renewcommand\chaptermark[1]{%
  \markboth{\thechapter\ -- #1}{\thechapter\ -- #1}%
}

\chapter{First appendix}
\kant
\end{appendices}
\end{document}

I used kantlipsum because with English hyphenation it is better than lipsum.

share|improve this answer
    
Marked as accepted solution. Anyway I am able to compile the code with lipsum while using toptesi. Not big deal, just saying. –  maximator Jun 9 at 13:58
    
@maximator I didn't realize I was using an old version of toptesi. –  egreg Jun 9 at 14:00

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.