Skip to main content
This tutorial gets you from zero to a working LaTeX document in about 30 minutes. You will create a document, add structure, format text, write equations, insert images, build tables, and finish with a practical next-step path.
This is the main beginner tutorial we want search engines and new readers to find first. If you want a broader orientation to tools and learning workflow, use the companion guide How to Start Learning LaTeX in 2026.
Time to complete: 30 minutes
Prerequisites: None
What you’ll learn: Document creation, formatting, images, math, and tables

What You Will Build

  • A minimal LaTeX document that compiles cleanly
  • A title block, sections, and basic text formatting
  • Lists, equations, images, and tables
  • A practical path into longer guides, templates, and project workflows

What is LaTeX?

LaTeX (pronounced “LAH-tek” or “LAY-tek”) is a document preparation system that produces professional-quality documents. Unlike word processors where you see the final result as you type, LaTeX uses plain text files with markup commands that get compiled into beautiful documents.

Why use LaTeX?

Think of LaTeX like HTML for documents. You write structured text, and LaTeX handles all the formatting consistently and professionally. It’s especially powerful for:
  • Academic papers and theses
  • Mathematical and scientific documents
  • Books and long-form content
  • Professional reports and presentations

Your First LaTeX Document

Let’s dive right in! Here’s the simplest possible LaTeX document:

Understanding the Structure

Every LaTeX document has two main parts:
  1. Preamble (before \begin{document}): Document settings and package imports
  2. Body (between \begin{document} and \end{document}): Your actual content
LaTeX commands always start with a backslash \ and are case-sensitive.

Adding Title and Author

Let’s make our document more professional by adding metadata: The \maketitle command creates a nicely formatted title block using the information you provided in the preamble.

Text Formatting

LaTeX provides simple commands for text formatting:

Paragraphs and Line Breaks

  • Leave a blank line to start a new paragraph
  • Use \\ to force a line break within a paragraph
  • Use \newpage to start a new page

Creating Lists

LaTeX makes it easy to create both bullet points and numbered lists:

Adding Math Equations

This is where LaTeX truly shines! You can add math inline with $...$ or as display equations with \[...\]:
LaTeX has hundreds of mathematical symbols and operators. Check our math reference guide for a complete list.

Inserting Images

To add images to your document, you’ll need the graphicx package:

Image Positioning Options

  • [h] - here (approximately)
  • [t] - top of page
  • [b] - bottom of page
  • [p] - separate page for floats

Creating Tables

Tables in LaTeX are powerful but need a bit of practice:

Table Column Alignment

  • l - left aligned
  • c - centered
  • r - right aligned
  • | - vertical line

Document Structure

For longer documents, use sections to organize your content: The \tableofcontents command automatically generates a table of contents based on your sections!

Comments in LaTeX

Use % to add comments that won’t appear in the output:

Common Packages

Extend LaTeX’s functionality with packages. Here are essential ones:

Troubleshooting Common Errors

LaTeX errors can be cryptic. Here are the most common ones and how to fix them:

Missing $ inserted

Problem: Math mode content outside math mode
Solution: Wrap math symbols in $...$

Undefined control sequence

Problem: Misspelled command or missing package
Solution: Check spelling and load required packages

Missing \begin

Problem: Content before document begins
Solution: Move content after \begin{document}

Your Complete First Document

Let’s put it all together! Here’s a complete document showcasing everything you’ve learned:

Next Steps

Congratulations! You’ve just created your first LaTeX documents. Here’s what to explore next:

Document Classes

Learn about article, report, book, and more

Advanced Math

Matrices, theorems, and complex equations

Bibliography

Manage citations and references

Custom Styling

Fonts, colors, and page layouts

Quick Reference Card

Keep this handy as you write:
Pro tip: Save this page as a bookmark! You’ll refer back to these basics often as you learn more advanced features.
Ready to dive deeper? Continue with our comprehensive LaTeX basics guide or explore specific topics that interest you!

Start in LaTeX Cloud Studio

Open in LaTeX Cloud Studio

Write, compile, and iterate directly in your browser.

Start from Article Template

Use a ready-made template, then adapt it to your content.