In LaTeX, you can create an unnumbered section (or subsection, chapter, etc.) with a short title by using the "starred" version of the sectioning commands.
Additionally, if you want this unnumbered section to appear in the Table of Contents (ToC), you'll need an extra command.
Here's how to do it:
1. Basic Unnumbered Section (No ToC Entry)
This is the simplest way. The section will appear in your document but will not have a number and will not be listed in the Table of Contents.
Command:
\section*{Your Short Title}
Example:
\documentclass{article}
\begin{document}
\section*{Introduction}
This is an unnumbered introduction. It will not appear in the Table of Contents.
\section{First Numbered Section}
This is a regular numbered section.
\subsection*{A Special Note}
This is an unnumbered subsection.
\end{document}
2. Unnumbered Section with a ToC Entry
If you want the section to be unnumbered in the document, but still listed in the Table of Contents, you need to use \addcontentsline. It's good practice to also use \phantomsection before \addcontentsline (especially with hyperref package) to ensure that the ToC entry links correctly to the section's position in the document.
Commands:
\phantomsection % For correct hyperlinking
\addcontentsline{toc}{<section_level>}{Your Short Title for ToC}
\section*{Your Short Title for Document}
<section_level> can be chapter, section, subsection, subsubsection, etc. Choose the level that matches the visual heading you're using (\section*, \subsection*, etc.) to get the correct indentation in the ToC.
- "Your Short Title for ToC" is the text that will appear in the Table of Contents.
- "Your Short Title for Document" is the actual heading text displayed in the document. They can be the same or different.
Example:
\documentclass{article}
\usepackage{hyperref} % Good for clickable ToC entries
\begin{document}
\tableofcontents % Display the Table of Contents
\newpage
\section{Numbered Section A}
This is a regular numbered section.
% Unnumbered section appearing in ToC
\phantomsection % Essential for hyperref to link correctly
\addcontentsline{toc}{section}{Foreword} % Adds "Foreword" to ToC as a section entry
\section*{Foreword}
This unnumbered section introduces the document. It is listed in the Table of Contents under "Foreword".
\subsection{Numbered Subsection A.1}
Content for A.1.
% Another unnumbered section, but appearing as a subsection in ToC
\phantomsection
\addcontentsline{toc}{subsection}{Special Thanks} % Adds "Special Thanks" to ToC as a subsection entry
\subsection*{Special Thanks}
We extend our gratitude to all contributors. This will be indented in the ToC like a subsection.
\section{Numbered Section B}
This is another regular numbered section.
\end{document}
Explanation of the \addcontentsline parameters:
toc: Specifies that the entry should go into the Table of Contents.
section: Specifies the hierarchical level for the entry in the ToC. This controls its indentation. If you use \section* but want it indented like a subsection in the ToC, you'd use subsection here.
Your Short Title for ToC: This is the exact text that will appear in the ToC.
Summary:
- For an unnumbered section without a ToC entry: Use
\section*{Your Title}.
- For an unnumbered section that does appear in the ToC: Use
\phantomsection\addcontentsline{toc}{<level>}{ToC Title}\section*{Document Title}.