The 30-Minute Crash Course
Master the absolute essentials in one massive, interactive session.
Open a blank project in LetX. We are going to build your first paper step by step. Copy and paste the code snippets into your editor as we go.
1. The Skeleton
Every document needs a skeleton. The absolute bare minimum code required to compile a PDF looks like this:
\documentclass{article}
\begin{document}
Hello, world!
\end{document}\documentclass{article}tells the compiler we are writing a standard article (not a book or a presentation).- The area between
\documentclassand\begin{document}is called the preamble. This is where we will put our settings. \begin{document}and\end{document}wrap the actual text that prints to the PDF.
2. The Title Block
Let's make this look like a real paper. We need a title, an author, and a date. These are defined in the preamble, but they won't actually print onto the page until we call \maketitle inside the document.
Update your code to look like this:
\documentclass{article}
% --- PREAMBLE ---
\title{My First LaTeX Paper}
\author{Your Name Here}
\date{\today}
% ----------------
\begin{document}
\maketitle
This is the start of my amazing paper.
\end{document}Notice \date{\today}? LaTeX will automatically insert the current date for you.
3. Abstract and Sections
Academic papers usually start with a brief summary called an abstract, followed by numbered sections. LaTeX handles the numbering and formatting of sections entirely automatically.
Add this right under \maketitle:
\begin{abstract}
This paper demonstrates my newfound ability to typeset documents using LaTeX. In just 30 minutes, I learned how to create structure, math, and lists.
\end{abstract}
\section{Introduction}
LaTeX is much better than Microsoft Word because it separates the content from the styling. I just type my text, and LaTeX figures out exactly how it should look based on professional typographic rules.
To start a new paragraph in LaTeX, you MUST leave a completely blank line between the text! Just hitting Enter once doesn't do anything.
\subsection{Background}
This is a subsection. Notice how it is automatically numbered 1.1!4. The Magic of Math
Now for the fun part. The primary reason people use LaTeX is to write beautiful math.
To write math inline with your text, wrap the equation in single dollar signs $ ... $. To write a large, centered equation on its own line, wrap it in \[ ... \].
Add this new section to your document:
\section{Mathematics}
The mass-energy equivalence formula is $E = mc^2$, discovered by Einstein.
However, if we want to show a much larger, more complex equation, we use display math. Here is the quadratic formula:
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]Look at how incredible that fraction and square root look! The \frac{numerator}{denominator} command creates fractions, and \sqrt{...} creates a square root over whatever is inside the braces.
5. Lists
Creating bulleted or numbered lists is incredibly easy.
- Use the
itemizeenvironment for bullet points. - Use the
enumerateenvironment for numbered lists. - Use the
\itemcommand to add a new point.
\section{My Favorite Things}
Here are a few things I like about LaTeX:
\begin{itemize}
\item The math formatting is beautiful.
\item It is completely free.
\item I don't have to worry about margins breaking.
\end{itemize}6. The Final Result
Congratulations! You've just written a fully structured academic document in under 30 minutes.
If you followed along, your complete code should look exactly like this:
\documentclass{article}
\title{My First LaTeX Paper}
\author{Your Name Here}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This paper demonstrates my newfound ability to typeset documents using LaTeX. In just 30 minutes, I learned how to create structure, math, and lists.
\end{abstract}
\section{Introduction}
LaTeX is much better than Microsoft Word because it separates the content from the styling. I just type my text, and LaTeX figures out exactly how it should look based on professional typographic rules.
To start a new paragraph in LaTeX, you MUST leave a completely blank line between the text! Just hitting Enter once doesn't do anything.
\subsection{Background}
This is a subsection. Notice how it is automatically numbered 1.1!
\section{Mathematics}
The mass-energy equivalence formula is $E = mc^2$, discovered by Einstein.
However, if we want to show a much larger, more complex equation, we use display math. Here is the quadratic formula:
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]
\section{My Favorite Things}
Here are a few things I like about LaTeX:
\begin{itemize}
\item The math formatting is beautiful.
\item It is completely free.
\item I don't have to worry about margins breaking.
\end{itemize}
\end{document}