# Subsubsection and enumerate combination

I can't manage to combinate the effects of enumerate and subsubsection in Latex. The output PDF shows a strange error. Here's my code:

\begin{document}
\chapter{Introduzione al Cloud Computing}
ahem
\section{Sicurezza dei sistemi Cloud}
hum
\subsection{Principali vulnerabilità della sicurezza in\\ambiente Cloud}
hey
\begin{enumerate}
\item \subsubsection{Data Breaches}
hello
\begin{itemize}
\item ciao
\end{itemize}
\item \subsubsection{Data Loss}
hi
\item \subsubsection{Account or Service Traffic Hijacking}
bzz
\item \subsubsection{Insecure Interfaces and APIs}
what
\item \subsubsection{Denial of Service}
ohnoes
\end{enumerate}
\end{document}


and here's the strange result:

subsubsection numbers 2 and 3 are overlapping. If I cut the first item's "sub-itemize", that is:

\begin{itemize}
\item ciao
\end{itemize}


the problem fades away! What am I missing? I am using Texmaker, and the following packages: fancyhdr, indentfirst, graphicx, newlfont, amssymb, amsmath, latexsym, amsthm, xcolor, hyperref, breakurl. Thanks in advance.

• It can't possibly be correct markup (even if it doesn't generate an error) to use a sectioning command inside a list, lists are intended to be within a section. – David Carlisle Sep 9 '14 at 20:54
• If you want sectioned subsubsections don't do this, just increase the secnumdepth counter so they are numbered automatically. – David Carlisle Sep 9 '14 at 20:56

You can number subsections by increasing secnumdepth and use just the subsubsection counter not the full 1.1.1 prefix by redefining \thesubsubsection. section headings should never be used within a list.

\documentclass{report}

\renewcommand\thesubsubsection{\arabic{subsubsection}}
\begin{document}
\chapter{Introduzione al Cloud Computing}
ahem
\section{Sicurezza dei sistemi Cloud}
hum
\subsection{Principali vulnerabilità della sicurezza in\\ambiente Cloud}
hey

\subsubsection{Data Breaches}
hello
\begin{itemize}
\item ciao
\end{itemize}
\subsubsection{Data Loss}
hi

\subsubsection{Account or Service Traffic Hijacking}
bzz
\subsubsection{Insecure Interfaces and APIs}
what
\subsubsection{Denial of Service}
ohnoes

\end{document}

• Thank you for your contribution! This solution works well, too! – noobsharp Sep 9 '14 at 21:14

A blank line (i.e. a \par) after the itemize fixes the problem. However it is not clear to me why you want to use \subsubsections here:

\documentclass{book}

\begin{document}

\chapter{Introduzione al Cloud Computing}
ahem
\section{Sicurezza dei sistemi Cloud}
hum
\subsection{Principali vulnerabilità della sicurezza in\\ambiente Cloud}
hey
\begin{enumerate}
\item \subsubsection{Data Breaches}
hello
\begin{itemize}
\item ciao
\end{itemize}

\item \subsubsection{Data Loss}
hi
\item \subsubsection{Account or Service Traffic Hijacking}
bzz
\item \subsubsection{Insecure Interfaces and APIs}
what
\item \subsubsection{Denial of Service}
ohnoes
\end{enumerate}

\end{document}

• Thank you so much! This is perfect! The reason why I want to use the subsubsection, is that, for every item of the enumerate, I have 5-6 pages of text, so I don't want to have a 30-35 pages enumerate in just one chapter. Doing this way, I can mantain the enumeration order, and the template will automatically create "subsubsection bookmarks" for every instance of the list. Thank you again! – noobsharp Sep 9 '14 at 21:14