2
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage[title,toc,titletoc,page]{appendix}

\begin{document}

\tableofcontents

\chapter{MyChapter}

\begin{appendices}
\chapter{Any appendix title}
\end{appendices}

\end{document}

I am not using \appendix because of the bug with \include (because in fact I am including all appendices and chapters). I like the default of this environment but I want to remove the "appendix" word in the toc (and only in the toc! I like it at within the appendix' header).

Currently:

Contents

1 MyChapter                       3 
Appendices                        5
Appendix A Any appendix title     7

Expected:

Contents

1 MyChapter                       3 
Appendices                        5
    A Any appendix title          7
    B ...

The indentation before A and B would be nice too.

1 Answer 1

1

a) According to the appendix manual, the option titletoc:

Adds a name (e.g., ‘Appendix’) before each appendix listed in the ToC

If you don't want it, don't use it.

b) You can indent the appendix entries with the package tocloft by setting \cftchapindent to some reasonable value.

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tocloft}
\usepackage[title,toc,page]{appendix}

\begin{document}

\tableofcontents

\chapter{MyChapter}

\begin{appendices}
\addtocontents{toc}{\protect\setlength{\cftchapindent}{3em}}
\chapter{Any appendix title}
\end{appendices}

\end{document}

enter image description here

4
  • a) Thanks for the hint to the option b) With this solution I have a problem. Please have a look at the expanded question :)
    – S-Man
    Feb 22, 2019 at 12:17
  • Hm, I really do not want to change the whole construct only for this one missing indent. Are there any other chances?
    – S-Man
    Feb 22, 2019 at 12:29
  • Split them up: tex.stackexchange.com/questions/476157/…
    – S-Man
    Feb 22, 2019 at 12:52
  • @S-Man Seen it...
    – DG'
    Feb 22, 2019 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .