LaTeX (LaTeX Document)
The gold standard for scientific and technical writing, where authors focus on content and let precise typesetting rules handle the rest.
| Full name | LaTeX Document |
| Extension | .tex |
| MIME type | application/x-latex |
| Developer | Leslie Lamport (maintained by the LaTeX Project) |
| Released | 1984 |
| Type | Document markup / typesetting |
| Based on | TeX (Donald Knuth, 1978) |
| Output formats | PDF, DVI, PostScript |
What is a LaTeX file?
A .tex file is a plain-text source document written in the LaTeX markup language. You write content mixed with commands, then compile it into a finished document, typically a PDF. It is the standard file format for scientific papers, academic theses, and technical books worldwide.
LaTeX is a document preparation system built on top of Donald Knuth's TeX typesetting engine. Instead of clicking buttons to format text, authors write commands like \section{} or \begin{equation} alongside their content. A compiler reads that source and produces pixel-perfect output, handling page layout, numbering, cross-references, and mathematical notation automatically. The result is typographically consistent output that would be very hard to achieve manually in a word processor.
History
Leslie Lamport created LaTeX at SRI International in the early 1980s, releasing version 2.06a in September 1984 and the widely adopted LaTeX 2.09 in August 1985. In 1989 Lamport handed maintenance to Frank Mittelbach and a community team, who released LaTeX2e in 1994 — the version still in use today, updated on a regular schedule. Lamport's companion book, published in 1986, became an international bestseller and cemented LaTeX as the lingua franca of scientific publishing.
How it works
A .tex file is plain ASCII or UTF-8 text, so any text editor can open it. Every document starts with a \documentclass declaration that sets the overall layout (article, report, book, beamer, and so on). A preamble follows, where authors load packages and set global options using \usepackage{}. The actual content sits between \begin{document} and \end{document}, organized with commands like \section, \subsection, \cite, and \label.
What it is used for
- Writing academic journal articles and conference papers in physics, mathematics, and computer science
- Producing PhD theses and dissertations with automatic chapter numbering and bibliography management
- Typesetting textbooks and technical manuals that contain heavy mathematical notation
- Creating professional presentation slides using the Beamer document class
How to open it
You can open and edit a .tex file in any plain-text editor, from Notepad to VS Code. To compile it into a readable PDF, you need a LaTeX distribution such as TeX Live (Linux/Windows), MacTeX (macOS), or MiKTeX (Windows), or you can use an online editor like Overleaf with no local installation.
Pros and cons
Strengths
- Produces publication-quality typesetting, especially for mathematics and multi-column layouts
- Source files are plain text, so they work well with version control systems like Git
- Automatic numbering and cross-referencing of sections, figures, tables, and citations
- Thousands of free packages on CTAN extend functionality for any scientific field
Trade-offs
- Steep learning curve for authors used to word processors
- Compilation errors can be cryptic and hard to trace for beginners
- Real-time visual preview requires extra tooling; the default workflow is edit-compile-check
- Collaborators unfamiliar with LaTeX may find editing difficult compared to DOCX-based workflows
Convert LaTeX files
Free, in your browser, no signup. Start at the LaTeX converter, or jump straight to a popular conversion below.
Curious how fast and how small? See our measured conversion benchmarks.
LaTeX FAQ
Is LaTeX a programming language?
Not exactly. LaTeX is a markup and macro language built on TeX. It has loops and conditionals, but its primary purpose is document typesetting, not general computation.
What is the difference between TeX and LaTeX?
TeX is the low-level typesetting engine created by Donald Knuth in 1978. LaTeX is a set of macros on top of TeX that provides higher-level commands like \section and \begin{figure}, making it far easier to use.
Can I convert a .tex file to PDF without installing software?
Yes. Online services like Overleaf compile .tex files in the browser. You can also upload a .tex file to a conversion tool to get a PDF back without installing TeX Live or MiKTeX locally.
Why do journals ask for .tex source files instead of PDFs?
Journals need the source so their typesetters can reflow text to fit their templates, adjust spacing, and correct proofs. A PDF is a fixed image of the page and cannot be edited at the source level.