Skip to main content
LaTeX (pronounced “LAY-tech” or “LAH-tech”) is the gold standard for creating professional documents, especially in academia and technical fields. This guide takes you from zero to your first beautiful document in under 30 minutes.

What is LaTeX and Why Should You Learn It?

LaTeX is a document preparation system that separates content from formatting. Instead of clicking buttons to style text, you write simple commands that LaTeX interprets to produce consistently formatted, publication-quality documents.

Why LaTeX in 2026?

  • Professional Quality: Output that matches professional publications
  • Mathematical Excellence: The best system for equations and formulas
  • Automatic Formatting: Consistent styling throughout your document
  • Reference Management: Automatic numbering, cross-references, and citations
  • Version Control: Works seamlessly with Git for collaboration
  • Universal Standard: Required by most academic journals and conferences
Who uses LaTeX? Researchers, academics, students, engineers, scientists, technical writers, and anyone who needs professional-quality documents with mathematical content.

Your First LaTeX Document (5 Minutes)

Let’s create your first document right now. Don’t worry about understanding everything—we’ll explain each part.

The Minimal Document

\documentclass{article}

\begin{document}

Hello, LaTeX! This is my first document.

\end{document}
That’s it! This produces a PDF with your text properly formatted. Let’s break it down:
LineMeaning
\documentclass{article}Specifies the document type (article, report, book, etc.)
\begin{document}Marks where your content begins
Your textThe actual content of your document
\end{document}Marks where your content ends

Try It Now

  1. Open LaTeX Cloud Studio
  2. Create a new project
  3. Paste the code above
  4. Click “Compile” or press Ctrl+Enter
  5. See your first PDF!

Building a Real Document (15 Minutes)

Now let’s create something useful—a proper article with title, sections, and formatting.

Step 1: Document Setup

\documentclass[12pt, a4paper]{article}

% Packages add extra functionality
\usepackage[utf8]{inputenc}    % Support for special characters
\usepackage[margin=1in]{geometry}  % Set page margins
\usepackage{amsmath}           % Better math support
\usepackage{graphicx}          % Include images
\usepackage{hyperref}          % Clickable links

\begin{document}

\end{document}
What are packages? Packages are extensions that add functionality to LaTeX. Think of them like apps for your document. The \usepackage{} command loads them.

Step 2: Add Title and Author

\documentclass[12pt, a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}

% Document information
\title{My First Research Paper}
\author{Your Name}
\date{\today}  % Automatically inserts today's date

\begin{document}

\maketitle  % Creates the title block

\end{document}

Step 3: Add Content Structure

\documentclass[12pt, a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}

\title{My First Research Paper}
\author{Your Name}
\date{\today}

\begin{document}

\maketitle

\begin{abstract}
This paper demonstrates basic LaTeX formatting including sections,
lists, equations, and figures. We show how simple commands create
professional documents.
\end{abstract}

\section{Introduction}
LaTeX is a powerful document preparation system used by academics
and professionals worldwide. This document serves as both a tutorial
and a template for your own work.

\section{Methods}
Our approach involves three main steps:

\subsection{Data Collection}
We gathered information from multiple sources to ensure accuracy.

\subsection{Analysis}
The data was processed using standard statistical methods.

\section{Results}
Our findings demonstrate the effectiveness of LaTeX for document
preparation.

\section{Conclusion}
LaTeX provides an excellent foundation for professional documents.

\end{document}

Essential Formatting Commands

Text Formatting

\textbf{Bold text}
\textit{Italic text}
\underline{Underlined text}
\texttt{Monospace/code text}

% Combining styles
\textbf{\textit{Bold and italic}}

% Size changes
{\large Larger text}
{\Large Even larger}
{\LARGE Much larger}
{\small Smaller text}
Output:
CommandResult
\textbf{Bold}Bold
\textit{Italic}Italic
\underline{Underlined}Underlined
\texttt{Code}Code

Lists

Bullet Points (Unordered)

\begin{itemize}
    \item First item
    \item Second item
    \item Third item with sub-items:
    \begin{itemize}
        \item Sub-item A
        \item Sub-item B
    \end{itemize}
\end{itemize}

Numbered Lists (Ordered)

\begin{enumerate}
    \item First step
    \item Second step
    \item Third step
\end{enumerate}

Description Lists

\begin{description}
    \item[LaTeX] A document preparation system
    \item[PDF] Portable Document Format
    \item[WYSIWYG] What You See Is What You Get
\end{description}

Paragraphs and Spacing

% New paragraph: leave a blank line
First paragraph text here.

Second paragraph starts after blank line.

% Line break within paragraph
Line one\\
Line two (same paragraph)

% Prevent paragraph indent
\noindent This paragraph has no indent.

% Add vertical space
\vspace{1cm}  % 1 centimeter of space

Adding Mathematics

LaTeX’s math capabilities are its crown jewel. Here’s how to use them:

Inline Math

Use $...$ for math within text:
The famous equation $E = mc^2$ changed physics forever.

The quadratic formula gives us $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$.

Display Math (Centered Equations)

Use \[...\] or the equation environment:
% Unnumbered equation
\[
    \int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
\]

% Numbered equation
\begin{equation}
    F = ma
    \label{eq:newton}
\end{equation}

% Reference the equation
As shown in Equation~\ref{eq:newton}...

Common Math Symbols

% Fractions
$\frac{a}{b}$

% Square root
$\sqrt{x}$, $\sqrt[3]{x}$

% Powers and subscripts
$x^2$, $x_i$, $x_i^2$

% Greek letters
$\alpha$, $\beta$, $\gamma$, $\delta$, $\epsilon$
$\pi$, $\sigma$, $\theta$, $\omega$, $\phi$

% Sums and products
$\sum_{i=1}^{n} x_i$
$\prod_{i=1}^{n} x_i$

% Integrals
$\int_a^b f(x) dx$

% Limits
$\lim_{x \to \infty} f(x)$

Multiple Aligned Equations

\begin{align}
    y &= mx + b \\
    y &= 2x + 3 \\
    y &= 2(4) + 3 \\
    y &= 11
\end{align}
Don’t forget the amsmath package! Many math features require \usepackage{amsmath} in your preamble.

Adding Images

Basic Image Inclusion

\usepackage{graphicx}  % In preamble

% In document
\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.8\textwidth]{image-filename}
    \caption{Description of your figure}
    \label{fig:myfigure}
\end{figure}

% Reference the figure
As shown in Figure~\ref{fig:myfigure}...

Image Options

% Control size
\includegraphics[width=5cm]{image}
\includegraphics[height=3cm]{image}
\includegraphics[scale=0.5]{image}

% Rotation
\includegraphics[angle=90]{image}

% Combined options
\includegraphics[width=0.5\textwidth, angle=45]{image}

Figure Placement Options

OptionMeaning
hHere (approximately)
tTop of page
bBottom of page
pSeparate page for floats
!Override LaTeX’s judgment
HExactly here (requires float package)

Creating Tables

Basic Table

\begin{table}[htbp]
    \centering
    \begin{tabular}{|l|c|r|}
        \hline
        Left & Center & Right \\
        \hline
        Data 1 & Data 2 & Data 3 \\
        Data 4 & Data 5 & Data 6 \\
        \hline
    \end{tabular}
    \caption{A simple table}
    \label{tab:simple}
\end{table}

Column Alignment

SpecifierAlignment
lLeft-aligned
cCentered
rRight-aligned
p{width}Paragraph column with specified width
``Vertical line

Professional Table (with booktabs)

\usepackage{booktabs}  % In preamble

\begin{table}[htbp]
    \centering
    \begin{tabular}{lcc}
        \toprule
        Method & Accuracy & Time (s) \\
        \midrule
        Baseline & 78.3\% & 1.2 \\
        Proposed & 94.7\% & 0.8 \\
        \bottomrule
    \end{tabular}
    \caption{Comparison of methods}
    \label{tab:comparison}
\end{table}

Cross-References

LaTeX’s automatic referencing prevents “Figure ??” errors:
% Create labels
\section{Introduction}
\label{sec:intro}

\begin{equation}
    E = mc^2
    \label{eq:einstein}
\end{equation}

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.5\textwidth]{diagram}
    \caption{System architecture}
    \label{fig:architecture}
\end{figure}

% Reference them
As discussed in Section~\ref{sec:intro}...
Equation~\ref{eq:einstein} shows that...
Figure~\ref{fig:architecture} illustrates...
Use the tilde (~) The ~ creates a non-breaking space, preventing awkward line breaks like:“Figure 1” → “Figure 1”

Complete Starter Template

Here’s a complete template you can use for any project:
\documentclass[12pt, a4paper]{article}

% Essential packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{hyperref}
\usepackage[style=authoryear]{biblatex}
\addbibresource{references.bib}

% Document info
\title{Your Document Title}
\author{Your Name\\
    \small Your Institution\\
    \small \texttt{[email protected]}}
\date{\today}

\begin{document}

\maketitle

\begin{abstract}
Your abstract goes here. Summarize your work in 150-250 words.
\end{abstract}

\tableofcontents
\newpage

\section{Introduction}
\label{sec:intro}

Introduce your topic here. You can cite sources like this \cite{example2024}.

\section{Background}
\label{sec:background}

Provide relevant background information.

\subsection{Related Work}
Discuss previous research in this area.

\section{Methods}
\label{sec:methods}

Describe your methodology. Include equations if relevant:

\begin{equation}
    y = mx + b
    \label{eq:linear}
\end{equation}

\section{Results}
\label{sec:results}

Present your findings. Add figures:

\begin{figure}[htbp]
    \centering
    % \includegraphics[width=0.8\textwidth]{your-figure}
    \caption{Description of your figure}
    \label{fig:results}
\end{figure}

And tables:

\begin{table}[htbp]
    \centering
    \begin{tabular}{lcc}
        \toprule
        Category & Value 1 & Value 2 \\
        \midrule
        A & 10 & 20 \\
        B & 15 & 25 \\
        \bottomrule
    \end{tabular}
    \caption{Your table caption}
    \label{tab:data}
\end{table}

\section{Discussion}
\label{sec:discussion}

Interpret your results. Refer back to Figure~\ref{fig:results} and Table~\ref{tab:data}.

\section{Conclusion}
\label{sec:conclusion}

Summarize your findings and suggest future work.

\printbibliography

\end{document}

Common Beginner Mistakes (And How to Avoid Them)

1. Missing Closing Braces

% Wrong
\textbf{bold text
\section{Title

% Correct
\textbf{bold text}
\section{Title}

2. Math Mode Errors

% Wrong - special characters outside math mode
x^2 + y^2 = z^2

% Correct
$x^2 + y^2 = z^2$

3. Special Characters

These characters have special meaning and need escaping:
% To print these literally, escape them:
\%  % Percent sign
\$  % Dollar sign
\&  % Ampersand
\#  % Hash
\_  % Underscore
\{  % Left brace
\}  % Right brace

4. Image File Extensions

% Don't include file extension (LaTeX finds it automatically)
% Wrong
\includegraphics{image.png}

% Correct
\includegraphics{image}

Next Steps

Now that you’ve mastered the basics, here’s your learning path:

Immediate Next Steps

  1. Practice: Create a document for a real project
  2. Templates: Explore our template gallery
  3. Math: Learn more in our math guide

Intermediate Topics

Advanced Topics

Quick Reference Card

TaskCommand
Bold\textbf{text}
Italic\textit{text}
Section\section{Title}
Subsection\subsection{Title}
Bullet list\begin{itemize}...\end{itemize}
Numbered list\begin{enumerate}...\end{enumerate}
Inline math$equation$
Display math\[equation\]
Figure\begin{figure}...\end{figure}
Table\begin{table}...\end{table}
Citation\cite{key}
Reference\ref{label}
Label\label{name}

Ready to start? Create your first document or browse our article templates to jumpstart your project.
Need help? Check our FAQ or join our community for support.