LaTeX for Beginners: Your First Document in 10 Min
LaTeX is a typesetting system for technical documents. Your first file needs \documentclass and a document environment. Build a complete page in ten minutes.
LaTeX is a typesetting system for producing technical and scientific documents with professional formatting. Instead of styling text by hand, you describe structure with commands and LaTeX handles layout, numbering, and math. Your very first document needs only two things: a \documentclass and a document environment. Here is a complete page you can compile in ten minutes.
1. The smallest complete document
\documentclass{article}
\begin{document}
Hello, world! This is my first LaTeX document.
\end{document}
\documentclass{article} sets the overall format; everything you want printed goes between \begin{document} and \end{document}. That section is called the body; everything above it is the preamble, where you load packages and set options.
2. Add structure
LaTeX numbers and formats sections for you. You never type "1.2" — you type the command and it counts.
\documentclass{article}
\title{My First Paper}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
This is the introduction.
\subsection{Background}
A subsection nests under the section above.
\section{Conclusion}
That's a structured document.
\end{document}
\maketitle prints the title block; \today inserts the current date automatically.
3. The formatting you'll use daily
| Goal | Command |
|---|---|
| Bold / italic | \textbf{...} / \textit{...} |
| Bullet list | itemize environment |
| Numbered list | enumerate environment |
| Inline math | $E = mc^2$ |
| New paragraph | a blank line |
| Comment | % to end of line |
\begin{itemize}
\item First point
\item Second point
\end{itemize}
4. Load a package when you need more
Packages add features. Load them in the preamble with \usepackage{}:
\usepackage[utf8]{inputenc} % accented characters
\usepackage{graphicx} % images
\usepackage{amsmath} % advanced math
\usepackage{hyperref} % clickable links
This is how LaTeX scales from a one-page memo to a 300-page thesis without changing approach.
5. Where to go next
You now know enough to write real documents. Next steps by goal:
- Math-heavy work → Write Math Equations in LaTeX
- A paper → How to Write a Research Paper in LaTeX
- A CV → Create a Resume/CV in LaTeX
- Slides → LaTeX Beamer Presentations
→ Open a blank document and compile it now — no install — at LetX, then browse ready-made LaTeX templates.
Written by Shihab Shahriar Antor — AI Engineer & Founder of Shahriar Labs, maker of LetX.
Frequently Asked Questions
Is LaTeX hard to learn?
LaTeX has a steeper start than a word processor because you write commands instead of clicking buttons, but the core is small: about a dozen commands cover most documents. Most beginners write a working paper within a day. The payoff is automatic numbering, flawless math, and consistent formatting that never drifts. Starting in an online editor removes the hardest part — installation — so you can focus on the markup itself.
Do I need to install anything to start with LaTeX?
No. Online editors like LetX run a full TeX Live distribution in the browser, so you can open a blank document and compile to PDF with zero setup. A local install (TeX Live or MacTeX, around 5 GB) plus an editor like VS Code with the LaTeX Workshop extension is worth it later for offline work, but it is unnecessary for learning and for most collaborative writing.
What is the difference between LaTeX and TeX?
TeX is the low-level typesetting engine Donald Knuth created in 1978. LaTeX, written by Leslie Lamport in the 1980s, is a set of higher-level macros on top of TeX that give you commands like \section and \begin{document} instead of raw TeX primitives. When people say they 'write in LaTeX', they mean they use these macros; the modern engines pdfTeX, XeTeX, and LuaTeX all run underneath.