Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Overleaf - LaTeX: Structuring and Formatting

Creating sections

The \section{..} command is used to insert sections into your document, where the section name is entered in the curly brackets.

The command \subsection{..} inserts a subsection into the document.

The command \subsubsection{..} inserts a second-level subsection.



The numbering of your sections in the document is done automatically.

Creating paragraphs

You can create a paragraph by skipping a line in your code.

To create a paragraph with no indentation in the beginning, use the command \noindent.

\noindent This is the beginning of a paragraph that has no indentation.


You can also add a footnote to your paragraph by using the \footnote{..} command.

This is a sentence.\footnote{Enter your footnote here.}


Document Size

To change the size of your document, enter the page type in square brackets in the \documentclass[..]{..} command. Two such options for page type include letterpaper and a4paper.

Font Size

The font size of the document can be changed by specifying the font size within the square brackets of the \documentclass[..]{..} command. If adding font size in addition to paper type, add a comma between the two specifications. Popular font sizes include 12pt, 11pt, and 10pt.


Font Style

LaTeX's default font is Computer Modern, but the editor also supports a number of other font types. Refer to the LaTeX font catalogue to see the range of fonts offered by LaTeX and how to use them in your document.

To italicize text, use the \textit{..} command and enter the text you would like italicized within the curly brackets.

To write text in bold, use the \textbf{..} command and enter the text you would like in bold within the curly brackets.

To underline text, use \underline{..} and enter the text you would like to underline within the curly brackets.

LaTeX also offers the option to format your text in small capital letters. To achieve this, use the \textsc{..} command.


The easiest way to change margins in LaTeX is by using the geometry package. To use a new package, use the \usepackage{..} function, specifying the package you want to use within curly brackets. You can specify your margins in the square brackets.


You can also customize the margins further by adding specifications for each side of the page.


Line Spacing

The spacing between lines in your document can be changed using the \linespread{..} command. Enter the desired line spacing within the curly brackets.


The command above will result in a line space of 1.5.