Reference

TEX (LaTeX)

A .tex file is the plain-text source for a TeX or LaTeX document — a markup language used to typeset technical and academic writing. You compile the .tex with a TeX engine to produce a polished PDF, especially for math-heavy papers.

Files & formatsGeneral

TEX (LaTeX)

Also known as: .tex file, LaTeX source, TeX document

A .tex file is the plain-text source for a TeX or LaTeX document — a markup language used to typeset technical and academic writing. You compile the .tex with a TeX engine to produce a polished PDF, especially for math-heavy papers.

  • Plain-text source for TeX/LaTeX typesetting
  • Compiles to PDF; standard for academic papers
  • Tiny text file; auxiliary outputs are disposable

How TeX and LaTeX work

You write a document as plain text marked up with commands — for sections, equations, citations, and figures — in a .tex file. A TeX engine (such as pdfLaTeX or XeLaTeX) then compiles that source into a finished PDF.

LaTeX is a set of macros on top of TeX that makes this practical, and it is the standard for math, physics, and computer-science papers because it renders complex equations and references beautifully.

Files and storage

The .tex source is a small, human-readable text file you can edit in any editor. Compiling it produces a PDF plus auxiliary files (.aux, .log, .toc) that you can safely delete and regenerate.

A LaTeX project can also pull in image and bibliography files, which are the parts that take real space. The .tex files themselves are tiny.

Related terms

Keep reading the reference.

Recommended solution

The curated tool collection for this kind of cleanup.