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!
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}.
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\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:
And, here is the output: