Although it seems to work, it give me this error during compilation of the full document (not with the example):
LaTeX Error: Command \c@lofdepth already defined.
It's impossible to diagnose a problem I cannot reproduce. A
minimal working example which actually produces the error would be necessary to tell. The error seems to have something to do with the list of figures?
Txuko wrote:That solves the problem of the index but does not solve the problem with the hyperref contents for the pdf.
Sorry your sample didn't contain the bookmarksnumbered option for hyperref, so it was hard to see the issue here.
I don't know of a good way to reformat the labels in the PDF bookmarks except via more drastic measures, such as skipping the \appendix command altogether and try to recreate its effects in other ways.
So, for example, you could try this:
Code: Select all
\documentclass[12pt,a4paper]{book}
\usepackage{appendix}
\usepackage[bookmarksnumbered]{hyperref}
% load tocloft package; leave titles alone
\usepackage[titles]{tocloft}
% put a dot after the chapter number in the toc
\renewcommand{\cftchapaftersnum}{.}
% figure out length that the appendix labels
% in TOC will need to be.
\newlength{\appnums}
\settowidth{\appnums}{\textbf{Appendix B.}}
% throw in an extra half em of padding
\addtolength{\appnums}{0.5em}
\begin{document}
\tableofcontents
\chapter{Intro}
...
\chapter{Concl}
...
% Rather than use the \appendix command, we'll manually reset the
% chapter counter and redefine how chapters are labelled
\setcounter{chapter}{0}%
\addtocontents{toc}{\protect\setlength{\protect\cftchapnumwidth}{\appnums}}%
\renewcommand{\thechapter}{Appendix~\Alph{chapter}}%
\renewcommand{\chaptername}{}%
\cleardoublepage
\chapter{My appendix 1}
...
\chapter{My appendix 2}
...
\end{document}