Welcome to the UK List of
TeX Frequently Asked Questions
on the Web

Searching

The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:
Google

How to create a \subsubsubsection

LaTeX’s set of “sections” stops at the level of \subsubsection. This reflects a design decision by Lamport — for, after all, who can reasonably want a section with such huge strings of numbers in front of it?

In fact, LaTeX standard classes do define “sectioning” levels lower than \subsubsection, but they don’t format them like sections (they’re not numbered, and the text is run-in after the heading). These deeply inferior section commands are \paragraph and \subparagraph; you can (if you must) arrange that these two commands produce numbered headings, so that you can use them as \subsubsubsections and lower.

The titlesec package provides a sensible set of macros for you to adjust the definitions of the sectioning macros, and it may be used to transform a \paragraph’s typesetting so that it looks like that of a \section.

If you want to program the change yourself, you’ll find that the commands (\section all the way down to \subparagraph) are defined in terms of the internal \@startsection command, which takes 6 arguments. Before attempting this sort of work, you are well advised to read the LaTeX sources (ltsect.dtx in the LaTeX distribution) and the source of the standard packages (classes.dtx), or to make use of the LaTeX Companion, which discusses the use of \@startsection for this sort of thing.

You will note that Lamport didn’t go on adding “sub” to the names of sectioning commands, when creating commands for the lowest levels of a document. This would seem sensible to any but the most rigorous stickler for symmetry — it would surely challenge pretty much anyone’s reading of the source of a document, if there was a need to distinguish \subsubsubsection and \subsubsubsubsection

LaTeX source
macros/latex/base (or browse the directory)
titlesec.sty
macros/latex/contrib/titlesec (or browse the directory); catalogue entry

This answer last edited: 2012-02-14


Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=subsubsub

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.27, released on 2013-06-07.