Getting Started
Text Formatting
Mathematical Expressions
Document Structure
LaTeX for Beginners
Welcome to LaTeX! This step-by-step guide will take you from zero to writing your first professional document. No prior experience required.
The fastest way to get started is using an online editor like Overleaf - no installation needed. Just create an account and start writing!
Need Help Writing LaTeX?
Underleaf uses AI to help you write LaTeX faster. Describe what you need in plain English, convert images to LaTeX, or get instant help fixing errors.
Try Underleaf Free
Step 1: Understanding the Basics
LaTeX documents are written in plain text with special commands that tell LaTeX how to format your document. Commands start with a backslash (\).
Command Example
\ extbf{bold text}Makes text bold
Environment Example
\egin{center}...\end{center}Centers content between begin/end
Step 2: Your First Document
Every LaTeX document has two parts: the preamble (settings) and the body (content). Here's the simplest possible document:
\documentclass{article}
\begin{document}
Hello, World! This is my first LaTeX document.
\end{document}What each line does:
\documentclass{article}- Tells LaTeX this is an article (other options: report, book, letter)\begin{document}- Marks where your content starts\end{document}- Marks where your content ends
Step 3: Adding a Title
Add title information in the preamble and generate it in the document:
\documentclass{article}
\title{My First LaTeX Document}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
This is the content of my document.
\end{document}The \today command automatically inserts the current date.
Step 4: Sections and Structure
Organize your document with sections. LaTeX automatically numbers them:
\section{Introduction}
This is the introduction.
\subsection{Background}
This is a subsection.
\subsubsection{Details}
This is a sub-subsection.
\section{Methods}
This is another main section.Output hierarchy:
1 Introduction
1.1 Background
1.1.1 Details
2 Methods
Step 5: Basic Text Formatting
Here are the most common formatting commands:
\textbf{Bold text}
\textit{Italic text}
\underline{Underlined text}
\texttt{Typewriter font}Bold text
Italic text
Underlined text
Typewriter font
Step 6: Writing Math Equations
One of LaTeX's greatest strengths is mathematical typesetting. Use $...$ for inline math and \[...\] for displayed equations:
Inline Math
The equation $E = mc^2$ changed physics forever.Output: The equation E = mc² changed physics forever.
Display Math
\[
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
\]\int_0^\infty e^{-x^2} dx = \rac{\sqrt{\pi}}{2}
Step 7: Creating Lists
Bullet Points
\begin{itemize}
\item First item
\item Second item
\item Third item
\end{itemize}Numbered List
\begin{enumerate}
\item First step
\item Second step
\item Third step
\end{enumerate}Step 8: Adding Packages
Packages extend LaTeX's capabilities. Add them in the preamble with \usepackage:
\documentclass{article}
\usepackage{amsmath} % Advanced math features
\usepackage{graphicx} % Include images
\usepackage{hyperref} % Clickable links
\usepackage{geometry} % Page margins
\begin{document}
...
\end{document}Essential Packages for Beginners:
amsmath- Essential for math equationsgraphicx- Include imageshyperref- Clickable links and referencesgeometry- Control page marginsbooktabs- Professional tables
Complete Starter Document
Here's a complete document template to get you started:
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\title{My Research Paper}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
This is the introduction to my paper. I will discuss
important topics and present my findings.
\section{Mathematical Background}
The famous equation by Einstein states that:
\[
E = mc^2
\]
where $E$ is energy, $m$ is mass, and $c$ is the
speed of light.
\section{Methods}
Our approach involved the following steps:
\begin{enumerate}
\item Data collection
\item Analysis
\item Interpretation
\end{enumerate}
\section{Conclusion}
In conclusion, LaTeX is an excellent tool for
writing professional documents.
\end{document}Common Beginner Mistakes
Missing closing braces
\ extbf{bold→
\ extbf{bold}Forgetting to escape special characters
50% complete→
50\% completeUsing wrong quotes
"quoted text"→
``quoted text''Special characters that need escaping:
# $ % ^ & _ {} ~ \Next Steps
Now that you know the basics, explore these topics to level up:
Quick Reference Card
Text Commands
\textbf{bold}
\textit{italic}
\underline{underline}
\section{Title}
\subsection{Subtitle}Math Commands
$inline math$
\[ display math \]
\frac{a}{b}
x^{2} and x_{i}
\sqrt{x}Practice makes perfect! Start with simple documents and gradually add complexity. Don't try to learn everything at once.
LaTeX for Beginners
Welcome to LaTeX! This step-by-step guide will take you from zero to writing your first professional document. No prior experience required.
The fastest way to get started is using an online editor like Overleaf - no installation needed. Just create an account and start writing!
Need Help Writing LaTeX?
Underleaf uses AI to help you write LaTeX faster. Describe what you need in plain English, convert images to LaTeX, or get instant help fixing errors.
Try Underleaf Free
Step 1: Understanding the Basics
LaTeX documents are written in plain text with special commands that tell LaTeX how to format your document. Commands start with a backslash (\).
Command Example
\ extbf{bold text}Makes text bold
Environment Example
\egin{center}...\end{center}Centers content between begin/end
Step 2: Your First Document
Every LaTeX document has two parts: the preamble (settings) and the body (content). Here's the simplest possible document:
\documentclass{article}
\begin{document}
Hello, World! This is my first LaTeX document.
\end{document}What each line does:
\documentclass{article}- Tells LaTeX this is an article (other options: report, book, letter)\begin{document}- Marks where your content starts\end{document}- Marks where your content ends
Step 3: Adding a Title
Add title information in the preamble and generate it in the document:
\documentclass{article}
\title{My First LaTeX Document}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
This is the content of my document.
\end{document}The \today command automatically inserts the current date.
Step 4: Sections and Structure
Organize your document with sections. LaTeX automatically numbers them:
\section{Introduction}
This is the introduction.
\subsection{Background}
This is a subsection.
\subsubsection{Details}
This is a sub-subsection.
\section{Methods}
This is another main section.Output hierarchy:
1 Introduction
1.1 Background
1.1.1 Details
2 Methods
Step 5: Basic Text Formatting
Here are the most common formatting commands:
\textbf{Bold text}
\textit{Italic text}
\underline{Underlined text}
\texttt{Typewriter font}Bold text
Italic text
Underlined text
Typewriter font
Step 6: Writing Math Equations
One of LaTeX's greatest strengths is mathematical typesetting. Use $...$ for inline math and \[...\] for displayed equations:
Inline Math
The equation $E = mc^2$ changed physics forever.Output: The equation E = mc² changed physics forever.
Display Math
\[
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
\]\int_0^\infty e^{-x^2} dx = \rac{\sqrt{\pi}}{2}
Step 7: Creating Lists
Bullet Points
\begin{itemize}
\item First item
\item Second item
\item Third item
\end{itemize}Numbered List
\begin{enumerate}
\item First step
\item Second step
\item Third step
\end{enumerate}Step 8: Adding Packages
Packages extend LaTeX's capabilities. Add them in the preamble with \usepackage:
\documentclass{article}
\usepackage{amsmath} % Advanced math features
\usepackage{graphicx} % Include images
\usepackage{hyperref} % Clickable links
\usepackage{geometry} % Page margins
\begin{document}
...
\end{document}Essential Packages for Beginners:
amsmath- Essential for math equationsgraphicx- Include imageshyperref- Clickable links and referencesgeometry- Control page marginsbooktabs- Professional tables
Complete Starter Document
Here's a complete document template to get you started:
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\title{My Research Paper}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
This is the introduction to my paper. I will discuss
important topics and present my findings.
\section{Mathematical Background}
The famous equation by Einstein states that:
\[
E = mc^2
\]
where $E$ is energy, $m$ is mass, and $c$ is the
speed of light.
\section{Methods}
Our approach involved the following steps:
\begin{enumerate}
\item Data collection
\item Analysis
\item Interpretation
\end{enumerate}
\section{Conclusion}
In conclusion, LaTeX is an excellent tool for
writing professional documents.
\end{document}Common Beginner Mistakes
Missing closing braces
\ extbf{bold→
\ extbf{bold}Forgetting to escape special characters
50% complete→
50\% completeUsing wrong quotes
"quoted text"→
``quoted text''Special characters that need escaping:
# $ % ^ & _ {} ~ \Next Steps
Now that you know the basics, explore these topics to level up:
Quick Reference Card
Text Commands
\textbf{bold}
\textit{italic}
\underline{underline}
\section{Title}
\subsection{Subtitle}Math Commands
$inline math$
\[ display math \]
\frac{a}{b}
x^{2} and x_{i}
\sqrt{x}Practice makes perfect! Start with simple documents and gradually add complexity. Don't try to learn everything at once.
Getting Started
Text Formatting
Mathematical Expressions
Document Structure