To achieve this, I have modified the \appendix definition to read
\newcommand\appendix{\cleardoublepage\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\renewcommand\@chapapp{\appendixname}%
\renewcommand\thechapter{\@Alph\c@chapter}%
\setcounter{tocdepth}{0}%
\@appendixtrue}
in my own .cls file (based on the standard book.cls). The main .tex
file contains the flag \appendix before the appendices are \include'd.
However, in the .dvi file, I still get all sections and subsections
in my table of contents. This is the default, but I would have
expected that once \appendix is processed, the counter is reset to
zero and so no more (sub)sections are included in the document.
Am I doing something wrong here? Is it at all possible to change
the tocdepth on the fly like this, or is there another way to do
this? I don't want to use section*, since I need the numbering
in the actual appendix itself.
Thanks for any suggestions!
Greetings,
Arnoud
--
\/ Arnoud "Galactus" Engelfriet - gala...@stack.nl This space
5th year Business & Computing Science student left blank
URL: http://www.stack.nl/~galactus/ PGP: 0x416A1A35 intentionally.
The problem is that tocdepth is evaluated in the table of contents,
NOT when the \section (or whatever) is called. You can solve this by
writing the new definition of tocdepth to the toc file. So instead of
your line
\setcounter{tecdepth}{0}
write
\addtocontents{toc}{\setcounter{tocdepth}{0}}
--
Bernd Schandl
Department of Mathematical Sciences
Clemson University
Clemson, SC 29634-1907
> \newcommand\appendix{\cleardoublepage\par
> \setcounter{chapter}{0}%
> \setcounter{section}{0}%
> \renewcommand\@chapapp{\appendixname}%
> \renewcommand\thechapter{\@Alph\c@chapter}%
> \setcounter{tocdepth}{0}%
> \@appendixtrue}
> in my own .cls file (based on the standard book.cls). The main .tex
> file contains the flag \appendix before the appendices are \include'd.
>
> However, in the .dvi file, I still get all sections and subsections
> in my table of contents. This is the default, but I would have
> expected that once \appendix is processed, the counter is reset to
> zero and so no more (sub)sections are included in the document.
You must write the new value to the toc file:
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
That's all.
________________________________
Javier Bezos
jbezos at mx3 dot redestb dot es
The tocvsec2 package (CTAN macros/latex/contrib/supported) enables
you to change the ToC contents (and the sectional numbering level) at
any point in the document.
Peter W.
peter.r...@boeing.com