Skip to Main Content

LaTeX document preparation system

Starting Your Article

If you are working with Overleaf, you will see that a basic structure appears in the text editor when we create a new project. Creating a project will lead to the following interface. Let's explain what each part does!

  1. Code Editor: This is where we write using LaTeX code.
  2. Compiled Document: This is the end product of your code.
  3. Compile Button: You need to use the Recompile button to compile your output after you make desired changes to your code editor. Alternatively, you can use the Ctrl + Enter shortcut (Cmd + Return on macOS).
  4. Download Button: You can download the .pdf document compiled using this button.
  5. File Management: This is where all of your files will appear. You can create folders and add images, .bib files, .pdf files, or other .tex documents.
  6. File Outline: This is where you can see the outline of your document. This section lists all headings and subheadings.
  7. Navigation Menu: This section helps you make comments (Review), share your document with others (Share), publish the document (Submit), check version history or changes you have made (History), change the layout of Overleaf (Layout), and communicate with your co-authors (Chat).

In LaTeX, you can write books, projects, CVs, letters, slides and many more. We are going to cover beamer document setting which will help us to create slides. If you want to learn more about document structure, make sure to check this LaTeX Document Structure.


Important Note # 1: Your LaTeX code should always go between \begin{document} ... \end{document}. If you want to change anything about how your document looks like, we make these changes between \documentclass{article} ... \begin{document}.

Important Note # 2: We can make comments in text using percentage sign %.

Important Note # 3: We list packages we need using \usepackage{package_name} command and we list them after \documentclass{article}and before \begin{document}.

Basic Commands

A common way to learn LaTeX or to remember how to do something is by looking at how others or you yourself have done it in another document. There is a large and helpful community of LaTeX users. Googling what you want to do will usually yield useful results. If a general search doesn’t help, try searching specific communities like Stack Overflow.

When writing LaTeX code, one advantage of Overleaf is its ability to automatically offer suggestions. For instance, I started writing \s and Overleaf came up with the following suggestions, which is really convenient:

Some basic formatting commands include:

  • \textbf{} for bold text.
  • \textit{} or \emph{} for italic text.

You can organize your document with 

  • \section{} for heading 1
  • \subsection{} for heading 2
  • \subsubsection{} for heading 3
  • LaTeX can make certain tasks easier. For example, you can add a table of contents by writing the command \tableofcontents where you want it to appear.

You can also create numbered lists or bulleted lists. For numbered lists:

\begin{itemize}

\item Each item begins with the \verb|\item| command.

\item Items are marked with a bullet point.

\item You can write as much text as needed for each item.

\end{itemize}

You can create numbered (ordered) lists like this:

\begin{enumerate}

\item Each item begins with the \verb|\item| command.

\item Items are marked with a bullet point.

\item You can write as much text as needed for each item.

\end{enumerate}

Let's see these commands in action:

  • Under figure management, we created a folder called figures and added a .jpg file.
  • As you can see from the file outline, now we have headings, subheadings, and subsubheadings.

And, here is the output: