LaTeX Section Numbering
Default is automatic. Customize with \setcounter{secnumdepth} for depth and \renewcommand{\thesection} for format.
Default behavior
\section{Introduction} % 1 Introduction
\subsection{Background} % 1.1 Background
\subsubsection{Goals} % 1.1.1 Goals
\section{Methods} % 2 MethodsLimit numbering depth
% Number only sections, leave subsections plain
\setcounter{secnumdepth}{1}
% Number through subsubsections (default is 2)
\setcounter{secnumdepth}{3}Change number format
% Roman numerals: I, II, III
\renewcommand{\thesection}{\Roman{section}}
% Letters: A, B, C
\renewcommand{\thesection}{\Alph{section}}
% Lowercase Roman: i, ii, iii (rare)
\renewcommand{\thesection}{\roman{section}}
% Subsections as letters
\renewcommand{\thesubsection}{\alph{subsection})} % a) b) c)
% Combined: chapter.section.subsection (book class default)
% \thesection = \thechapter.\arabic{section} e.g., 2.3
% \thesubsection = \thesection.\arabic{subsection} e.g., 2.3.4Unnumbered sections
% Skip numbering AND TOC
\section*{Acknowledgments}
% Skip numbering, KEEP in TOC
\section*{Preface}
\addcontentsline{toc}{section}{Preface}
% Number but suppress in TOC (rare; manual workaround)
\section{Hidden Section}
\addtocontents{toc}{...} % hacky, prefer \section* approachHierarchy levels
| Command | Depth | Available in |
|---|---|---|
| \part | -1 | book, report |
| \chapter | 0 | book, report |
| \section | 1 | all classes |
| \subsection | 2 | all classes |
| \subsubsection | 3 | all classes |
| \paragraph | 4 | all classes |
| \subparagraph | 5 | all classes |
#set heading(numbering: "1.") // 1, 2, 3
#set heading(numbering: "1.1") // 1.1, 1.2 hierarchy
#set heading(numbering: "I.") // Roman numerals
#set heading(numbering: "A.1") // mixed: A.1, A.2, B.1Try TypeTeX free Frequently Asked Questions
Standard classes (article, report, book) number sections automatically: 1, 2, 3 for sections; 1.1, 1.2, 2.1 for subsections; 1.1.1 for subsubsections. Numbers come from the \thesection counter format. Default depth (which levels get numbered) goes down to subsubsection (depth=3).
Use the starred form: \section*{Title}. Skips numbering and the TOC. Common for Acknowledgments, Abstract, References. To keep it in the TOC: \section*{Title} \addcontentsline{toc}{section}{Title}.
\setcounter{secnumdepth}{1} numbers only sections (skip subsections). Set to 0 for chapters only (in book class), 2 for subsections (default), 3 for subsubsections. Lower-numbered settings produce a cleaner look in long documents.
\renewcommand{\thesection}{\Roman{section}} for I, II, III. Other options: \Alph (A, B, C), \alph (a, b, c), \arabic (default 1, 2, 3), \roman (i, ii, iii). Place in preamble. \thesubsection works the same way for subsections.
In book/report class, \renewcommand{\thesection}{\thechapter.\arabic{section}} produces 1.1, 1.2, 2.1, 2.2 (chapter.section). \setcounter{section}{0} at \chapter inputs resets — though most book classes do this automatically.
Default in book class: 1.1.1 for chapter 1, section 1, subsection 1. Override with \renewcommand{\thesubsection}{\Alph{subsection}} for A, B, C — flat letters under the section number.
Hierarchy of headings in article class: \section (level 1, like H2 in HTML), \subsection (H3), \subsubsection (H4), \paragraph (H5), \subparagraph (H6). Book/report class adds \part (H1) and \chapter (also H1-equivalent for major divisions).
\stepcounter{section}{2} skips the next 2 numbers. Or \setcounter{section}{4} to set the section counter to 4 (so the next \section becomes 5). Useful for matching journal numbering or starting at a specific number.
\section*{Title} skips both numbering and TOC. To get TOC inclusion: \section*{Title} \addcontentsline{toc}{section}{Title}. Or use \addsec from the KOMA-Script bundle (scrartcl class) which does both.