[Tex/LaTex] Deeper levels of (sub)sections don’t appear in the LaTeX output of pandoc. Why

markdownpandocsectioning

I use pandoc to create latex and PDF from Markdown. Markdown, being designed for HTML, allows 6 levels of headers H1…H6. But when converting to PDF, via tex, I get only three levels: 1 (\section), 1.1 (\subsection) and 1.1.1 (\subsubsection).

The tex source has no command around the deeper level headers. 1.1.1.1 simply does not exist and is treated as plain text.

Where should I look, in order to get latex to support deeper levels of headers/sections? Is that possible at all? Or should I consider restructuring the document so as never to go below 1.1.1, header level three, \subsubsection?

Best Answer

\documentclass{report}
\setcounter{secnumdepth}{5}
\begin{document}
\part{Part}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph}
\subparagraph{Subparagraph}
\end{document}

You can change the formatting of these using the titlesec package.