# How many levels of nested subsections can the article class support?

How many nested subsections can I create using article class in LaTeX? E.g. for first level I use \subsection, for second level I use \subsubsection. My question is how deep can I go?

-
More than the level it starts to make no sense to human readers. –  percusse Mar 4 '14 at 17:42

By default the article supports only the

• \part
• \section
• \subsection
• \subsubsection

as well as \paragraph and \subparagraph. It is possible to add additional sections but you should check if it's not easier to switch the class. Here's an example how it may look like (taken from my blog post, uses the KomaScript scrartcl class):

\documentclass{scrartcl}
\setlength{\parindent}{0pt}

\makeatletter
\renewcommand*\l@paragraph{\@dottedtocline{5}{7.0em}{4.1em}}
\renewcommand*\l@subparagraph{\@dottedtocline{6}{10em}{5em}}
\makeatother

\usepackage{titlesec}
\usepackage{titletoc}

\titlecontents{subsubsubsection}[9em]{}{\contentslabel{3.9em}}%
{\hspace*{-1.2em}}{\titlerule*[0.675pc]{.}\contentspage}

\makeatletter
\newcounter{subsubsubsection}[subsubsection]
\setcounter{subsubsubsection}{1}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\renewcommand{\thesubsubsubsection}{\thesubsubsection.\@arabic\c@subsubsubsection}

\titleclass{\subsubsubsection}{straight}[\subsubsection]
\titleformat{\subsubsubsection}{\sf}{\thetitle}{0.9em}{}[]
\titlespacing{\subsubsubsection}{0pt}{3.25ex plus 1ex minus 0.2ex}{1.5ex plus 0.2ex}

\renewcommand\paragraph{\@startsection{paragraph}{5}%
{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}%
}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}%
{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}%
}
\makeatother

\usepackage{hyperref}
\makeatletter
\newcommand*{\toclevel@subsubsubsection}{4}%
\renewcommand*{\toclevel@paragraph}{5}%
\renewcommand*{\toclevel@subparagraph}{6}%
\makeatother

\begin{document}

\tableofcontents

\section{Hier die Section}
\subsection{Hier die eine Sub-Section}
\subsubsection{Hier die SubSub-Section}
\subsubsubsection{Hier die neue SubSubSub-Section} Hallo Welt
\paragraph{Hier der Paragraph} Hallo Welt
\subparagraph{Hier der Sub-Paragraph} Hallo Welt

\section{Hier die Section}
\subsection{Hier die eine Sub-Section}
\subsubsection{Hier die SubSub-Section}
\subsubsubsection{Hier die neue SubSubSub-Section} Hallo Welt
\paragraph{Hier der Paragraph} Hallo Welt
\subparagraph{Hier der Sub-Paragraph} Hallo Welt
\end{document}


As you see lots of definitions needed to be made and I am not 100\% sure I got them all.

-

The default article provides the following levels of sectioning

• \part (level 0)
• \section (level 1)
• \subsection (level 2)
• \subsubsection (level 3)
• \paragraph (level 4)
• \subparagraph (level 5)

If you wish to add levels below this, see How to add an extra level of sections with headings below \subsubsection.

Note that more levels are rarely required, since one can always default to lists to provide nested/deeper levels of enumeration.

-
I believe part and chapter are book only? –  vonbrand Mar 5 '14 at 2:52
@vonbrand: \chapter is book and report only, but \part is also available in article. –  Werner Mar 5 '14 at 5:18
thanks a lot for the reply and for your link to the post. The problem I had using that approach was that paragraph was not showing in ToC –  MSB Mar 7 '14 at 0:51
@user3166042: For this you need to adjust tocdepth. See How to show \subsections and \subsubsections in ToC? –  Werner Mar 7 '14 at 2:39