# How to get different chapter titles in TOC

How do I get different chapter titles in TOC, e.g. "Chapter" for the first few chapters and "Appendix" for the last?

This is a part of my preamble and my main document:

\usepackage[toc,page]{appendix}
\renewcommand\appendixname{Appendiks}
\renewcommand\chaptername{Kapitel}
\renewcommand\contentsname{Indholdsfortegnelse}
\renewcommand\appendixpagename{Appendiks}
\renewcommand\appendixtocname{Appendiks}
}

\appendix

\titleformat{\chapter}[hang]
{\fontfamily{georgia}\bf\Huge\color{black}}{Appendiks \thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\filright\fontfamily{georgia}\Huge\bf}[\vspace{0.1mm}\titlerule]
\titlespacing*{\chapter}{0pt}{0pt}{20pt}

Document:

\begin{appendices}

\chapter{First appendix}

\end{appendices}


• As always on the site please post a full (but minimal) self contained example that others can test as is. As your question is now we cannot help as the answer depends on the document class and preamble you are using. – daleif Sep 20 at 11:44

To do that you should use the \appendix command before your appendices. Note that it will affect each \chapter{} you will use after it.

\appendix will change "Kapitel" to "Anhang". If you want to have "Appendix" instead you should give the following command in your preamble, where *appendix name* is the word you want to have:

\addto\captionsgerman{\renewcommand{\appendixname}{*appendix name*}}

P.S.: I assumed that your document is in German and did some attempts. Please note that I'm not German, so there might be better solutions.

You can use a combination of the tocloft and appendix packages. The following works with English names but the packages allow you to use any names you wish; read the documentation.

% tocnameprob.tex  % put Chapter/Appendix before the number
\documentclass{book} % or any other class that provides \chapter
\usepackage{lipsum}
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter } % put Chapter before ToC Chapter entries
\newlength{\tocl}% a scratch lenght
\settowidth{\tocl}{\bfseries\cftchappresnum\cftchapaftersnum}% extra space for Chapter
\usepackage[titletoc]% Option to put Appendix (\appendixname) before ToC Appendix entries
{appendix}
\begin{document}
\tableofcontents
\chapter{One}
\lipsum[1]
\section{one}
\lipsum[2]
\chapter{Two}
\lipsum[3]
\section{two}
\lipsum[4]
\begin{appendices}
\chapter{Appone}  % first Appendix
\lipsum[5]
\section{appone}
\lipsum[6]
% and more appendices
\end{appendices}
\end{document}


There may be more efficiant ways to accomplish this, but it works.