Documentation/Getting Started/Write Your First LaTeX Document in 5 Minutes
Getting Started

Write Your First LaTeX Document in 5 Minutes

You don't need to be a programmer to use LaTeX. In this tutorial you'll go from zero to a compiled PDF in under five minutes using a free online editor—no installation required.

Step 1 — Choose an Editor

The fastest way to start is with a free online editor like Bibby AI or Overleaf. No software to install—just open your browser and sign up. If you prefer working locally, install TeX Live (Linux/Mac) or MiKTeX (Windows) plus a text editor like VS Code with the LaTeX Workshop extension.

% Option A: Online (recommended for beginners)
% → Go to bibby.ai and create a free account
%
% Option B: Local installation
% → Install TeX Live: https://tug.org/texlive/
% → Install VS Code + LaTeX Workshop extension
Output: You now have an environment ready to write LaTeX.

Step 2 — Create a .tex File

In your editor, create a new file called main.tex. This is the source file the LaTeX compiler will read.

% File: main.tex
% This file will contain all your document code.
Output: An empty main.tex file is created in your project.

Step 3 — Write a Minimal Document

Every LaTeX document needs at least a \documentclass, \begin{document}, and \end{document}. Add a title, author, and some body text:

\documentclass{article}

\title{My First Document}
\author{Your Name}
\date{\today}

\begin{document}
\maketitle

Hello! This is my very first \LaTeX{} document.

I can write paragraphs, use \textbf{bold} and \textit{italic} text,
and even include math like $E = mc^2$.

\end{document}
Output: The source file is complete with a title page, formatted text, and an inline equation.

Step 4 — Compile to PDF

In an online editor, click the Compile button (or press Ctrl+S / Cmd+S). Locally, run pdflatex main.tex in a terminal. The compiler converts your source into a PDF.

% Online: click Compile / Recompile
% Local terminal:
% pdflatex main.tex
Output: main.pdf is generated with a nicely formatted title, author, date, body text, and equation.

Step 5 — View and Iterate

Open the PDF to see your document. Edit the source, recompile, and see changes instantly. Try adding a section or a bullet list:

\section{Introduction}
This is a new section.

\begin{itemize}
  \item First point
  \item Second point
  \item Third point
\end{itemize}
Output: The PDF now includes a numbered section heading and a bullet list.

💡 Tips

  • Save and compile often to catch errors early
  • LaTeX error messages point to a line number—go to that line first
  • Start simple and add complexity gradually (packages, figures, citations)
  • Use templates from your university or journal to skip boilerplate setup

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

Write Your First LaTeX Document in 5 Minutes | Bibby AI | Bibby AI