I took the example code from the following question and edited it.
I'm writing a long book, and I intend to have more appendices than there are letters in the alphabet, so I took the following code from another question:
\usepackage{alphalph,etoolbox}
\appto\appendix{% patch \appendix so \AlphAlph is used
\renewcommand\thechapter{\AlphAlph{\value{chapter}}}%
}
I also added the following code into the main matter:
\appendix
\chapter{Causality}
\lipsum[1-15]
\setcounter{chapter}{24} % just to see the effect
\chapter{Twenty five}
\chapter{Twenty six}
\chapter{Twenty seven}
\chapter{Twenty eight}
The solution works perfectly, where when I exceed the last letter of the Alphabet (Z), the next appendix is called AA, but now I have a problem with the table of contents, as shown below:
The table of contents isn't configured to take into account appendices that take up multiple characters, so the spacing is causing the words to stick to the appendix letters, and I already don't like the spacing between appendix A and the word "Causality," because it appears as if it's simply a chapter called "A Causality."
I'd like to add a ":" or a "-" to the text, or perhaps a better solution. How do I achieve this within the template that I've taken from the other question.
I also looked at the following question, but it's not quite what I want.


\documentclassare you using? – Werner Jul 07 '17 at 21:25