(click anywhere to close)

[LaTeX] Sectioning

category: Writing | course: LaTeX | difficulty:

The first step in creating a well-structured document is sectioning – dividing the text into smaller and smaller sections, subsections and paragraphs. LaTeX has very good support for this, as long as you don’t want a hierarchy more than 3 levels deep. But, that would result in a mess anyway, so you don’t want that.

These sectioning commands are available, in order of importance:


Hierarchy Level







Only available in books and reports
















Letters don’t have any sectioning commands, and using them in such a document will result in an error.


Lorem ipsum

Lorem ipsum

Lorem ipsum

Lorem ipsum

Lorem ipsum

Lorem ipsum


Advantages of Sectioning

The most important reason to use this is, of course, that is keeps your documents structured and well-organized. But, they also simplify your life quite a bit, for these reasons:

  • They automatically gradually decrease font size, which means that, for instance, \part will be typeset with large letters, and \subsubsection typeset with small letters.
  • They automatically number your sections. For example, the first \subsection after the second \section command will automatically have the number 2.1 prefixed.
  • They make it easy to create an automatically updated table of contents.

Turn off Numbering

If you don’t want a section to be numbered, use its star variation.

\section{I am a section}
\section*{Me too!}
\section{And three make a crowd.}

Table of Contents

If your document has been structured well, all you have to do to create a table of contents is call the command \tableofcontents.

This only takes into account numbered sections, however, which means you need to add others you want to include manually. This is done by adding


right after you declare the section.


\section{First One}
Lorem ipsum...
\section{Second One}
Lorem ipsum...
\addcontentsline{toc}{section}{Third One}
\section*{Third One}
Lorem ipsum...

Title Page

Right after you start the document, you have the opportunity to create a good-looking title page with some special commands: \title{title}, \author{authors}, \date{date}

Authors need to be separated by the \and command – most other commands and symbols won’t work on a title page. You can also use the \thanks{text} command to thank anyone.

You don’t need to define all of them, and if you leave out the date, LaTeX will just use today’s date. But, even if you’ve defined them, you need to tell the processor when you’re done with your title page and it can be created. This is done with the \maketitle command.

\title{This Is A Title!}
\author{Made by Me \and Myself \and I}



Most (scientific) papers start by providing an abstract or summary of what’s inside, and LaTeX has the abstract environment for that. It automatically adds the text Abstract above it, but you’ll learn later on how to customize that.

This documents is about something very interesting that you can't really understand without reading it, but this will give you the summary anyway.
Do you like my tutorials?
To keep this site running, donate some motivational food!
Chocolate Milk