General ⇒ do want appendices listed in toc
do want appendices listed in toc
I am Farrukh from Uni. of Innsbruck.
I am using \chapter in my appendix, cause I want to number my chapters and sections etc in appendices, but I want that my appendices to be listed in toc. I am using appendix package.
Any idea
best regards,
Farrukh
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: don't want appendices listed in toc
Sorry again.
regards,
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
do want appendices listed in toc
welcome to the board!
You could change the tocdepth counter:
Code: Select all
\addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}
Stefan
Re: do want appendices listed in toc

Farrukh
do want appendices listed in toc
that's strange. The following simple example shows that Stefan_K[/code]'s suggestion works:
Code: Select all
\documentclass{report}
\usepackage{appendix}
\begin{document}
\tableofcontents
\chapter{Dummy chapter}
\appendix
\addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}
\chapter{First appendix}.
\chapter{Second appendix}
\end{document}
do want appendices listed in toc
With your example of article class it works fine. But with me not.
I am sorry I should have mentioned that I am using class svmono. Below the code how I am using it and that still generates appendices in the toc
Code: Select all
\documentclass[envcountsame,envcountchap,twoside]{svmono}
\usepackage{appendix}
\begin{document}
\tableofcontents
\chapter{Dummy chapter}
\appendix
\addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}
\chapter{First appendix}.
\chapter{Second appendix}
\end{document}
Regards,
- Attachments
-
- svmono.cls
- svmono class file
- (60.11 KiB) Downloaded 290 times
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
do want appendices listed in toc
it seems that svmono doesn't respect tocdepth. But you could disable \l@chapter (and \l@section etc.), like:
Code: Select all
\appendix
\makeatletter
\addtocontents{toc}{\protect\renewcommand\protect\l@chapter[2]{}}
\makeatother
Re: do want appendices listed in toc
How one can learn these things ?

Cheers,
Farrukh