Create Your First Document in 5 Minutes
Follow this step-by-step tutorial to produce your first professional PDF — complete with title, sections, formatted text, a math equation, and a list. Works on any device, no setup required.
Step 1 — Open the Editor
Open the editor using the button below. A blank document is ready for you to start typing. No account required for your first document.
Start Writing →Step 2 — Set Up the Document Class
The very first line of any LaTeX document declares the document class. For a general-purpose document, article is the right choice. The optional arguments set the base font size to 12pt and the paper size to A4.
\documentclass[12pt, a4paper]{article}Step 3 — Load Essential Packages
After the document class declaration, load the packages you need. For a beginner document, four packages cover almost everything:
\usepackage[utf8]{inputenc} % Handle accented characters
\usepackage{amsmath} % Math environments and symbols
\usepackage{graphicx} % Include images
\usepackage{hyperref} % Clickable links in the PDFStep 4 — Add Document Metadata
Still in the preamble, set the title, author, and date. The \today command inserts the current date automatically when you compile.
\title{My First LaTeX Document}
\author{Your Name}
\date{\today}Step 5 — Write the Document Body
Now open the document environment and add your content. The \maketitle command renders the title block.
\begin{document}
\maketitle
\section{Introduction}
LaTeX produces beautifully typeset documents. Unlike word processors,
you describe the \textbf{structure} of your document using commands,
and LaTeX handles the visual formatting automatically.
\section{A Simple Equation}
In physics, the relationship between energy and mass is:
\[
E = mc^2
\]
where $E$ is energy, $m$ is mass, and $c$ is the speed of light.
\section{A Short List}
Here are three reasons to learn LaTeX:
\begin{enumerate}
\item Perfect typesetting of mathematical formulas
\item Automatic numbering and cross-references
\item Publication-quality PDF output
\end{enumerate}
\end{document}Step 6 — Compile and View the PDF
Press Ctrl+S (or click the Compile button) to compile. Within a few seconds, your PDF appears in the preview panel on the right. You should see:
- →A title block with your document title, name, and today's date
- →Three numbered sections: Introduction, A Simple Equation, A Short List
- →A properly typeset display equation — E = mc²
- →An auto-numbered ordered list
The Complete Document
Here is everything together in one file. Copy this into the editor and compile:
\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}
\title{My First LaTeX Document}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
LaTeX produces beautifully typeset documents. Unlike word processors,
you describe the \textbf{structure} of your document using commands,
and LaTeX handles the visual formatting automatically.
\section{A Simple Equation}
In physics, the relationship between energy and mass is:
\[
E = mc^2
\]
where $E$ is energy, $m$ is mass, and $c$ is the speed of light.
\section{A Short List}
Here are three reasons to learn LaTeX:
\begin{enumerate}
\item Perfect typesetting of mathematical formulas
\item Automatic numbering and cross-references
\item Publication-quality PDF output
\end{enumerate}
\end{document}What to Try Next
Now that your first document works, experiment with these modifications to build confidence:
Add a new section
Insert \section{Conclusion} followed by a paragraph
Try bold and italic
Use \textbf{bold} and \textit{italic} inside any paragraph
Add a table of contents
Insert \tableofcontents after \maketitle — recompile twice to update
Change the font size
Change 12pt to 11pt or 14pt in the \documentclass options
Add a footnote
Insert \footnote{This is a footnote.} anywhere in the text
Open the editor and try it now
Paste the complete document above and compile — you will have a PDF in under 10 seconds.
Start Writing