Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
Some good answers here already. For a broader, fairly comprehensive look at the TeX document hierarchy, check out en.wikibooks.org/wiki/LaTeX/Document_Structure – naught101 Apr 3 '12 at 5:04

2 Answers

up vote 14 down vote accepted
\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.

share|improve this answer

There are two levels below \subsubsection which are \paragraph and \subparagraph. Whether some sectioning command is numbered or appears in the table of contents is selected by the secnumdepth and tocdepth counters, respectively.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.