Graphics, Figures & TablesTOC disable subsection of appendix

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
nico
Posts: 20
Joined: Tue Jun 08, 2010 10:13 am

TOC disable subsection of appendix

Post by nico »

Hello,

i added appendices by invoking \appendix. Please see the working example:

Code: Select all

%\documentclass[10pt,a4paper]{scrartcl}
\documentclass[a4paper]{article}

\usepackage[utf8]{inputenc}	%inputencoding
\usepackage{uniinput}
\usepackage[ngerman]{babel}	%Silbentrennung
\usepackage[unicode,a4paper, colorlinks=true,linkcolor=black,citecolor=black,menucolor=black]{hyperref}
\usepackage{lmodern}		%uA besseres PDF
\renewcommand*\thesection{\Roman{section}}

\begin{document}
\pdfbookmark[1]{Inhaltsverzeichnis}{Inhaltsverzeichnis}
\tableofcontents
\pagebreak
%------------------------------------------------------------------------------
\section{Einleitung}
\subsection{Aufgabenstellung}
\subsection{Unterlagen, Vorgespräche}
\subsection{Grundlagen der Brandbekämpfung von Silobränden}
\subsection{Gefahren während eines Silobrandes}
\subsection{Quellen}
\renewcommand*{\refname}{\vspace*{-12mm}}
\bibliography{../../bsnLiteratur} 
\pagebreak
%------------------------------------------------------------------------------
\section{Beschreibung des Objekts, Grundlagen}
\subsection{Lage, bauliche Merkmale}
\subsection{Betriebsbeschreibung}
\subsection{Schutzziel}
\subsection{Brandszenarien}
\pagebreak
%------------------------------------------------------------------------------
\section{Maßnahmen zur Gefahrenabwehr}
\subsection{Bauliche und technische Voraussetzungen}
\subsection{Vorbeugende und organisatorische Maßnahmen}
\subsection{Abwehrende Maßnahmen/Ablaufplan}
\pagebreak
%------------------------------------------------------------------------------
\section{Zusammenfassung}
\pagebreak
%------------------------------------------------------------------------------
\appendix
\renewcommand*\thepage{\thesection.\Roman{page}}
%------------------------------------------------------------------------------
\section{Vorgehensweise für die Feuerwehr}
\setcounter{page}{1}
\subsection{Grundlegendes}
\subsection{Maßnahmen}
	\subsubsection{Allgemeines Vorgehen}
	\subsubsection{Verhinderung der Brandausbreitung}
	\subsubsection{Verhinderung des Einsturzes}
	\subsubsection{Inertisierung vorbereiten}
	\subsubsection{Inertisierung}
	\subsubsection{Ausräumen}
\pagebreak
%------------------------------------------------------------------------------
\section{Ablaufplan}
\setcounter{page}{1}
\pagebreak
%------------------------------------------------------------------------------
\section{Notwendige Maßnahmen im Vorfeld}
\setcounter{page}{1}
\end{document}
I want the subsection from the normal document to appear in the TOC (like I.1, I.2, II.1 …), but i don't want the subsections of the appendices to appear in the TOC (like A.1, A.2…).

Can anybody help me with this?
Last edited by nico on Tue Jun 08, 2010 2:58 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Re: TOC disable subsection of appendix

Post by php1ic »

Use \section*{Section name} for all of your appendix sections.
nico
Posts: 20
Joined: Tue Jun 08, 2010 10:13 am

Re: TOC disable subsection of appendix

Post by nico »

Ah damn. Thank you so much! Sometimes it's so easy. I just had the wrong search words. Just for accuracy: I had to use \subsection*{Subsection name} and \subsubsection*{Subsubsection name}
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: TOC disable subsection of appendix

Post by kaiserkarl13 »

There's a better (and faster) solution:

\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}

This will turn off all numbering (change the value of tocdepth as appropriate) without you needing to change subsection to subsection*.

I'm sorry to post to a "solved" entry, but it seems relevant to future readers.
Post Reply