| 1 |
|
| 2 |
\documentclass{article} |
| 3 |
|
| 4 |
\usepackage{tocvsec2} |
| 5 |
\maxtocdepth{subsubsection} |
| 6 |
\maxsecnumdepth{subsubsection} |
| 7 |
|
| 8 |
\def\x{% |
| 9 |
\subsection{sone} xyz |
| 10 |
\subsubsection{ssone} abc |
| 11 |
\subsubsection{sstwo} def |
| 12 |
\subsection{stwo} 123 |
| 13 |
\paragraph{foo} here |
| 14 |
} |
| 15 |
|
| 16 |
\begin{document} |
| 17 |
\makeatletter |
| 18 |
|
| 19 |
\tableofcontents |
| 20 |
\section{Normal section} |
| 21 |
\x |
| 22 |
|
| 23 |
\setsecnumdepth{subsection} |
| 24 |
\settocdepth{subsection} |
| 25 |
\section{Reduce numbering} |
| 26 |
\x |
| 27 |
|
| 28 |
\setsecnumdepth{section} |
| 29 |
\settocdepth{section} |
| 30 |
\section{Reduce numbering again} |
| 31 |
\x |
| 32 |
|
| 33 |
\resetsecnumdepth |
| 34 |
\resettocdepth |
| 35 |
\section{Reset numbering once} |
| 36 |
\x |
| 37 |
|
| 38 |
\setsecnumdepth{section} |
| 39 |
\settocdepth{section} |
| 40 |
\section{Reduce numbering again} |
| 41 |
\x |
| 42 |
|
| 43 |
\resetsecnumdepth* |
| 44 |
\resettocdepth* |
| 45 |
\section{Another normal section after resetting completely} |
| 46 |
\x |
| 47 |
|
| 48 |
\appendix |
| 49 |
|
| 50 |
\settocdepth{all} |
| 51 |
\setsecnumdepth{all} |
| 52 |
\section{Appendix with all numbering} |
| 53 |
\x |
| 54 |
|
| 55 |
|
| 56 |
\end{document} |