General ⇒ do want appendices listed in toc
do want appendices listed in toc
Hi all,
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
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
NEW: TikZ book now 40% off at Amazon.com for a short time.

Re: don't want appendices listed in toc
Sorry for typing mistake in my last mail. I want NOT to list appendices in toc.
Sorry again.
regards,
Sorry again.
regards,
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
do want appendices listed in toc
Hi Farrukh,
welcome to the board!
You could change the tocdepth counter:
right after \appendix.
Stefan
welcome to the board!
You could change the tocdepth counter:
Code: Select all
\addtocontents{toc}{\protect\setcounter{tocdepth}{-2}}
Stefan
LaTeX.org admin
Re: do want appendices listed in toc
Thank you for your kind reply and welcome. But this command did not help. I still see appendices in toc
.
Farrukh

Farrukh
do want appendices listed in toc
Hi hfarrukhn,
that's strange. The following simple example shows that Stefan_K[/code]'s suggestion works:
Do not forget to compile your document twice since you are generating a ToC. If your problem persists then we will need more information. Could you please post a minimal working example showing the undesired bahaviour?
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}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
do want appendices listed in toc
Hi,
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
I have attached svmono class file with this reply.
Regards,
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 281 times
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
do want appendices listed in toc
Hi Farrukh,
it seems that svmono doesn't respect tocdepth. But you could disable \l@chapter (and \l@section etc.), like:
Stefan
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
LaTeX.org admin
Re: do want appendices listed in toc
This worked right away! Thank you very much Stefan. You are doing a great job on this community.
How one can learn these things ?
Cheers,
Farrukh
How one can learn these things ?

Cheers,
Farrukh