MarkDone
Explainer

What is LaTeX?

Updated July 2026 ยท 6 min read

LaTeX is a document preparation and typesetting system. It is best known for mathematical formulas, research papers, theses, technical reports, and books where the structure of the document matters as much as the words on the page.

In plain terms, you write text with commands that describe what each part is: a title, section, formula, citation, table, or list. Instead of dragging text boxes around or manually styling every heading, LaTeX turns that source into a polished document or PDF.

LaTeX is not a word processor

A word processor is visual first. You select text, click buttons, adjust spacing, and keep nudging the page until it looks right. LaTeX is source first. You write the content and mark what each part means: title, section, paragraph, formula, citation, table, list.

That difference feels unusual at first, but it is why LaTeX is so strong for long and technical documents. It separates writing from layout. You can focus on the meaning of the document while LaTeX handles numbering, references, spacing, typography, and page breaks.

What LaTeX source looks like

A short LaTeX document might look like this:

\documentclass{article}
\begin{document}

\section{Energy}

Einstein's mass-energy relation is:

\[
E = mc^2
\]

\end{document}

The commands describe the document structure and the mathematical expression.

The source is plain text, but the output is a typeset PDF. The formula is not just typed characters. It is laid out with mathematical spacing, superscripts, symbols, and alignment rules that are hard to reproduce manually.

Why LaTeX became popular for math

Mathematics needs more than bold and italic text. It needs fractions, roots, matrices, integrals, limits, Greek letters, subscripts, superscripts, and nested notation. LaTeX gives these a compact written form.

\frac{a}{b}
\sqrt{x}
\alpha + \beta
x_i^2
\int_0^1 x^2\,dx

LaTeX math syntax is dense, but it is predictable and portable.

That portability is a major reason LaTeX survived. The same formula can appear in a paper, a textbook, a Markdown note, a documentation page, or a PDF export. Once you learn the syntax, you can reuse it across tools.

Where LaTeX is still used

Inline math vs display math

Most modern writing tools that support LaTeX math use two common patterns. Inline math sits inside a sentence:

The value $x^2$ grows quickly.

Display math gets its own line and is meant for larger formulas:

$$
E = mc^2
$$

Inline math is useful for small expressions. Display math is better for formulas that readers should pause and inspect. A good technical document usually uses both.

LaTeX vs Markdown

Markdown is simpler. It is excellent for notes, documentation, README files, lists, links, and code blocks. LaTeX is more powerful for formal typesetting and complex math. In practice, many people use them together: Markdown for the document structure, LaTeX syntax for the formulas.

Markdown keeps writing lightweight. LaTeX makes the math precise. Together, they cover a lot of everyday technical writing.

That combination is why you often see formulas inside Markdown files, especially in technical README files, course notes, data science reports, and AI-generated explanations.

When LaTeX is worth learning

LaTeX is worth learning if your documents include formulas, references, repeated structure, or publication-level formatting. If you only need a short note or a simple checklist, Markdown is usually faster. If you need a thesis, a research paper, or a dense mathematical explanation, LaTeX becomes a serious advantage.

You do not need to learn the whole system at once. A practical starting point is math syntax: superscripts, subscripts, fractions, roots, Greek letters, and display formulas. For copyable examples, use the LaTeX syntax guide. Those few pieces already make technical writing much cleaner.

FAQ

What is LaTeX?

LaTeX is a document preparation system that turns plain-text source and formatting commands into professionally typeset documents. It is especially useful when a document includes math, citations, references, tables, or repeated structure.

Is LaTeX a markup language?

LaTeX is not usually described as a markup language in the same sense as HTML, but its source uses markup-like commands such as \section{...} and \textbf{...}. Those commands describe the role of content instead of its exact visual position.

What is a LaTeX document?

A LaTeX document is a plain-text source file, usually with a .tex extension, containing the document content and LaTeX commands. A LaTeX compiler processes that source into a formatted output, most often a PDF.

What is LaTeX notation?

LaTeX notation is the compact command syntax used for formulas and document structure. For example, \frac{a}{b} writes a fraction, while $x^2$ writes inline math. The LaTeX syntax guide has copyable examples.

Write Markdown with LaTeX-style math Use Markdown for structure, LaTeX syntax for formulas, and export the result to PDF in your browser.
Open Markdown to PDF

If your formulas live in documentation, you may also want README to PDF. If your technical notes include diagrams, try Mermaid to PDF.