Hubbry Logo
logo
LaTeX
Community hub

LaTeX

logo
0 subscribers
Read side by side
from Wikipedia
LaTeX
Original authorLeslie Lamport
Initial release1984; 41 years ago (1984)
Stable release
November 2024 LaTeX release[1] Edit this on Wikidata / 1 November 2024; 12 months ago (1 November 2024)
Repository
TypeTypesetting
LicenseLaTeX Project Public License (LPPL)
Websitewww.latex-project.org

LaTeX (/ˈlɑːtɛk/ LAH-tek or /ˈltɛk/ LAY-tek,[2] often stylized as LaTeX) is a software system for typesetting documents,[3] based on TeX. LaTeX provides a high-level, descriptive markup language to utilize TeX more easily: TeX handles the document layout, while LaTeX handles the content side for document processing. Because the plain TeX formatting commands are elementary, it provides authors with ready-made commands for formatting and layout requirements such as chapter headings, footnotes, cross-references and bibliographies.

LaTeX was originally written in the early 1980s by Leslie Lamport at SRI International.[4] The current version is LaTeX2e, first released in 1994 but incrementally updated starting in 2015. This update policy replaced earlier plans for a separate release of LaTeX3, which had been in development since 1989.[5] LaTeX is free software and is distributed under the LaTeX Project Public License (LPPL).[6]

Like TeX, LaTeX started as a writing tool for mathematicians and computer scientists, but even from early in its development, it has also been taken up by scholars who needed to write documents that include complex math expressions or non-Latin scripts,[7][8] such as Arabic, Devanagari, and Chinese.[9]

History

[edit]

LaTeX was created in the early 1980s by Leslie Lamport when he was working at Stanford Research Institute (SRI). He needed to write TeX macros for his own use and thought that with a little extra effort, he could make a general package usable by others. Peter Gordon, an editor at Addison-Wesley, convinced him to write a LaTeX user's manual for publication (Lamport was initially skeptical that anyone would pay money for it);[10] it came out in 1986[3] and sold hundreds of thousands of copies.[10] Meanwhile, Lamport released versions of his LaTeX macros in 1984 and 1985. On 21 August 1989, at a TeX Users Group (TUG) meeting at Stanford, Lamport agreed to turn over maintenance and development of LaTeX to Frank Mittelbach. Mittelbach, along with Chris Rowley and Rainer Schöpf, formed the LaTeX3 team; in 1994, they released LaTeX2e, the current standard version. LaTeX3 has since been discontinued as a separate format and has become a programming layer within LaTeX2e since 2018.[5]

Typesetting system

[edit]

LaTeX attempts to follow the design philosophy of separating presentation from content, so that authors can focus on the content of what they are writing without attending simultaneously to its visual appearance. In preparing a LaTeX document, the author specifies the logical structure using simple, familiar concepts such as chapter, section, table, figure, etc., and lets the LaTeX system handle the formatting and layout of these structures. As a result, it encourages the separation of the layout from the content – while still allowing manual typesetting adjustments whenever needed. This concept is similar to the mechanism by which many word processors allow styles to be defined globally for an entire document, or the use of Cascading Style Sheets in styling HyperText Markup Language (HTML) documents.

The LaTeX system is a markup language that handles typesetting and rendering,[11] and can be arbitrarily extended by using the underlying macro language to develop custom macros such as new environments and commands. Such macros are often collected into packages, which could then be made available to address some specific typesetting needs such as the formatting of complex mathematical expressions or graphics (e.g., the use of the align environment provided by the amsmath package to produce aligned equations).

To create a document in LaTeX, a user first creates a file, such as document.tex, typically using a text editor.[12] The user then gives their document.tex file as input to the TeX program (with the LaTeX macros loaded), which prompts TeX to write out a file suitable for onscreen viewing or printing.[13] This write-format-preview cycle is one of the chief ways in which working with LaTeX differs from the What-You-See-Is-What-You-Get (WYSIWYG) style of document editing. It is similar to the code-compile-execute cycle known to computer programmers. Today, many LaTeX-aware editing programs make this cycle a simple matter through the pressing of a single key while showing the output preview on the screen beside the input window. Some online LaTeX editors even automatically refresh the preview,[14][15][16] while other online tools provide incremental editing in-place, mixed in with the preview in a single window.[17]

Pronunciation and typography

[edit]
The LaTeX wordmark, typeset with LaTeX's \LaTeX macro

The characters 'T', 'E', and 'X' in the name come from the Greek capital letters tau, epsilon, and chi, as the name of TeX derives from the Ancient Greek: τέχνη ('skill', 'art', 'technique'); for this reason, TeX's creator Donald Knuth promotes its pronunciation as /tɛx/ (tekh)[18] (that is, with a voiceless velar fricative as in Modern Greek, or the ch in loch). Lamport remarks that "TeX is usually pronounced tech, making lah-tech, lah-tech, and lay-tech the logical choices; but language is not always logical, so lay-tecks is also possible."[19]

The name is printed in running text with a typographical logo: LaTeX. In media where the logo cannot be precisely reproduced in running text, the word is typically given the unique capitalization LaTeX. Alternatively, the TeX, LaTeX,[20] and XeTeX[21] logos can also be rendered via pure CSS and XHTML for use in graphical web browsers – by following the specifications of the internal \LaTeX macro.[22]

Example

[edit]

The example below shows the input to LaTeX and the corresponding output from the system:

Input Output
\documentclass{article} % Starts an article
\usepackage{amsmath} % Imports amsmath
\title{\LaTeX} % Title

\begin{document} % Begins a document
  \maketitle
  \LaTeX{} is a document preparation system for
  the \TeX{} typesetting program. It offers
  programmable desktop publishing features and
  extensive facilities for automating most
  aspects of typesetting and desktop publishing,
  including numbering and cross-referencing,
  tables and figures, page layout,
  bibliographies, and much more. \LaTeX{} was
  originally written in 1984 by Leslie Lamport
  and has become the dominant method for using
  \TeX; few people write in plain \TeX{} anymore.
  The current version is \LaTeXe.

  % This is a comment, not shown in final output.
  % The following shows typesetting power of LaTeX:
  \begin{align}
    E_0 &= mc^2 \\
    E &= \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}}
  \end{align} 
\end{document}
[edit]
CircuiTikZ and tikz diagrams created with CoCalc

As a macro package, LaTeX provides a set of macros for TeX to interpret. There are many other macro packages for TeX, including Plain TeX, GNU Texinfo, AMSTeX, Chemfig, chemmacros,[23] PSTricks, PSfrag, and ConTeXt.

When TeX "compiles" a document, it follows (from the user's point of view) the following processing sequence: Macros → TeX → Driver → Output. Different implementations of each of these steps are typically available in TeX distributions. Traditional TeX will output a DVI file, which is usually converted to a PostScript file. In 2000, Hàn Thế Thành and others wrote an implementation of TeX called pdfTeX, which also outputs to PDF and takes advantage of features available in that format.[24] The XeTeX engine developed by Jonathan Kew, on the other hand, merges modern font technologies and Unicode with TeX.[25] LuaTeX is an extended version of pdfTeX using Lua as an embedded scripting language.[26]

Compatibility and converters

[edit]

LaTeX documents (*.tex) can be opened with any text editor. They consist of plain text and contain no hidden formatting codes or binary information. TeX documents can also be shared by rendering the LaTeX file to other formats such as OpenDocument, XML, or class (*.cls) files. LaTeX can also (and commonly is) rendered to PDF files using the LaTeX extension pdfLaTeX. LaTeX files containing Unicode text can be processed into PDFs with the inputenc package, or by the TeX extensions XeLaTeX and LuaLaTeX.

LaTeX has become the de facto standard to typeset mathematical expression in scientific documents.[33][34] Hence, there are several conversion tools focusing on mathematical LaTeX expressions, such as converters to MathML or Computer Algebra System.

  • MathJax is a JavaScript library for converting LaTeX to MathML, picture formats including SVG and PNG, or HTML for embedding within a webpage.
  • KaTeX is a JavaScript library for converting LaTeX to HTML and MathML. It is developed by Khan Academy, and is among the fastest LaTeX to HTML converters.[36]

Licensing

[edit]

LaTeX is typically distributed along with plain TeX under a free software licence: the LaTeX Project Public License (LPPL).[37] The LPPL is not compatible with the GNU General Public License, as it requires that modified files must be clearly differentiable from their originals (usually by changing the filename); this was done to ensure that files that depend on other files will produce the expected behavior and avoid dependency hell. The LPPL is Debian Free Software Guidelines (DFSG) compliant as of version 1.3. As free software, LaTeX is available on most operating systems.

Versions

[edit]
LaTeX
Filename extension
.tex
Internet media type
Initial release1994; 31 years ago (1994)
Latest release
LaTeX2e
1994; 31 years ago (1994)
Type of formatDocument file format

LaTeX2e is the current version of LaTeX, since it replaced LaTeX 2.09 in 1994.[38] As of 2020, LaTeX3, which started in the early 1990s, is under a long-term development project.[5] Planned features include improved syntax (separation of content from styling), hyperlink support, a new user interface, access to arbitrary fonts and a new documentation.[39] Some LaTeX3 features are available in LaTeX2e using packages,[40] and by 2020 many features have been enabled in LaTeX2e by default for a gradual transition.[5]

There are many commercial implementations of the entire TeX system. System vendors may add extra features like added typefaces and telephone support. LyX is a free software, WYSIWYM visual document processor that uses LaTeX for a back-end.[41] TeXmacs is a free, WYSIWYG editor with similar functionalities as LaTeX, but with a different typesetting engine.[42] Other WYSIWYG editors that produce LaTeX include Scientific Word on Windows and macOS.

Many community-supported TeX distributions are available.

Adoption

[edit]

LaTeX is widely used in academia for the communication and publication of scientific documents and technical note-taking in many fields, owing partially to its support for complex mathematical notation.[43][33] It also has a prominent role in the preparation and publication of books and articles that contain complex multilingual materials, such as Arabic and Greek.[44] LaTeX uses the TeX typesetting program for formatting its output, and is itself written in the TeX macro language.

LaTeX can be used as a standalone document preparation system or as an intermediate format. In the latter role, for example, it is sometimes used as part of a pipeline for translating DocBook and other XML-based formats for PDF. The typesetting system offers programmable desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop publishing, including numbering and cross-referencing of tables and figures, chapter and section headings, graphics, page layout, indexing and bibliographies.

See also

[edit]

References

[edit]

Further reading

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
LaTeX is a document preparation system and macro package for the TeX typesetting engine, designed to produce high-quality technical and scientific documents, especially those featuring complex mathematical notation.[1] It allows users to write documents using a markup language that separates content from presentation, enabling automated formatting for elements like equations, tables, figures, bibliographies, and cross-references.[2] Developed by Leslie Lamport in the late 1970s and early 1980s as an extension of Donald Knuth's TeX program—which Knuth created starting in 1978 to address limitations in traditional typesetting for his multivolume The Art of Computer Programming—LaTeX simplifies TeX's low-level commands into higher-level structures for easier use by non-experts.[3][4] The system's core philosophy emphasizes portability, consistency, and precision, producing output in formats such as PDF or DVI that is suitable for professional printing and digital distribution.[1] LaTeX supports a wide range of document classes, including article, book, and report, and is highly extensible through thousands of packages available from the Comprehensive TeX Archive Network (CTAN), covering topics from graphics and fonts to multilingual typesetting.[2] Since its first widely available version (LaTeX 2.09) in the mid-1980s and the stable LaTeX2ε release in 1994, it has been maintained by the volunteer LaTeX Project team, with ongoing updates for modern features like UTF-8 encoding support introduced in 2018.[5][2] Widely adopted in academia, research, and publishing due to its reliability and ability to handle intricate layouts without proprietary software, LaTeX runs on all major platforms via free distributions like TeX Live and has been used by millions for theses, journal articles, and books.[1] Its open-source nature under the LaTeX Project Public License ensures community-driven evolution, making it a standard tool for precise document creation in fields requiring rigorous notation and structure.[6]

History and Development

Origins and Creation

Donald Knuth initiated the development of TeX in 1978, motivated by frustration with the inadequate quality of digital typesetting encountered in computer science publications. Specifically, while preparing galley proofs for the second volume of his seminal work The Art of Computer Programming, Knuth was dismayed by the poor typographic results produced by the publisher's new computerized system, prompting him to design a precise tool for high-quality mathematical and technical typesetting.[7][8] In the early 1980s, Leslie Lamport, a computer scientist at SRI International, built upon Knuth's TeX by creating LaTeX as a set of macros to simplify its use for document authors without deep typesetting expertise. Lamport aimed to abstract TeX's low-level programming into higher-level commands, enabling users to focus on content rather than formatting details. LaTeX's first public release occurred in 1984, marking it as an accessible extension of TeX's underlying macro language.[9] The primary goals of LaTeX were to establish a markup-based system for producing structured documents, emphasizing separation of content from presentation to facilitate collaborative technical writing, especially in fields requiring complex mathematics. By treating documents as marked-up text files, LaTeX allowed authors to describe logical structure—such as sections, equations, and references—while automatically handling layout and typography for professional output. This approach was particularly suited to scientific and academic authoring, where precision in rendering formulas and symbols is essential.[9] LaTeX gained early traction within academic communities in mathematics and physics, where its capabilities for typesetting intricate equations and structured papers aligned with the needs of researchers sharing preprints and manuscripts. The American Mathematical Society became a prominent early promoter, integrating LaTeX enhancements into its publication workflows and fostering its spread through user meetings and style guides.

Key Milestones

In 1985, LaTeX achieved its first widespread distribution through DECUS tapes, enabling broader adoption among users of Digital Equipment Corporation systems and marking a key step in its dissemination beyond initial academic circles.[10] The LaTeX Project Team was formed in 1989, with Leslie Lamport handing over development responsibilities to Frank Mittelbach, Chris Rowley, and Rainer Schöpf, establishing a collaborative framework for ongoing maintenance and enhancements.[11] The LaTeX3 project, aimed at redesigning the system for greater extensibility and robustness, was initiated in 1990, laying the groundwork for future programming interfaces.[12] During the early 1990s, the team introduced the New Font Selection Scheme (NFSS) in 1993, which revolutionized font handling by providing a more flexible and scalable model for selecting and encoding typefaces, addressing limitations in earlier versions.[13] This was followed by the release of LaTeX2e in 1994, which unified disparate variants of LaTeX into a single, extensible kernel, standardizing features like document classes and packages while ensuring backward compatibility.[14] Spanning the 2010s and 2020s, the LaTeX3 project made significant progress, particularly through the development of the expl3 syntax, a robust programming layer introduced in its modern form around 1998 and refined over decades to enable systematic, error-resistant code with features like expandable functions and comprehensive testing suites.[15] By 2025, major distributions such as TeX Live integrated enhanced Unicode support, leveraging LuaTeX's native capabilities for better handling of international characters and scripts, with LuaTeX increasingly positioned as the default engine for modern workflows due to its scripting integration and output versatility.[16]

Evolution of Standards

The LaTeX Project Team, formed in the late 1980s to oversee the evolution of LaTeX from its initial 1985 release, has played a pivotal role in maintaining and refining the system's standards, ensuring compatibility, stability, and enhancements across distributions.[9] This team, comprising core developers like Frank Mittelbach and David Carlisle, coordinates releases, resolves inconsistencies in the kernel, and integrates community feedback to uphold high-quality typesetting practices.[17] Their efforts include regular updates to the LaTeX format, such as the biannual releases that incorporate bug fixes and new features while preserving backward compatibility.[18] A key aspect of these standardization initiatives is the development of authoritative style guides, notably the LaTeX Companion series, which has profoundly influenced best practices among users and developers since its first edition in 1993.[19] Authored by LaTeX Project Team members including Frank Mittelbach and Michel Goossens, the series provides detailed documentation on core commands, package integration, and document structuring, serving as a de facto reference for consistent usage.[20] The third edition, released in 2023 as a two-volume set, expands coverage to modern workflows, emphasizing modular design and accessibility, thereby guiding the community toward standardized, reproducible document production.[21] Central to LaTeX's standardization is the LaTeX2e format, introduced in 1994, which formalized core document classes such as article, report, and book, along with essential environments to ensure uniform structure and output across implementations.[22] The article class, designed for shorter publications, defaults to one-sided layout with optional abstracts and supports environments like enumerate, itemize, and figure for lists and floating elements.[22] In contrast, the book class accommodates two-sided printing with openright chapters and dedicated title pages, while environments such as thebibliography and theindex provide standardized formatting for references and indices, all governed by configurable options like paper size and font scaling (10pt, 11pt, 12pt).[22] These elements, defined in the kernel, promote interoperability and have remained foundational since LaTeX2e's adoption as the stable standard.[23] In the 2020s, efforts to align LaTeX with contemporary archival standards have advanced through integrations with modern engines like XeLaTeX, enabling PDF/A compliance for long-term document preservation.[24] Packages such as pdfx, updated in recent years, facilitate PDF/A-1b and PDF/A-2b generation when compiled with XeLaTeX, embedding metadata, fonts, and ICC profiles to meet ISO 19005 requirements without altering core LaTeX syntax.[25] Similarly, ConTeXt's LuaTeX-based architecture has influenced hybrid approaches, allowing LaTeX users to leverage its advanced output routines for standards-compliant PDFs in specialized workflows.[26] The LaTeX3 programming layer, integrated progressively since 2020, further supports these developments by enhancing font handling and hook systems for robust compliance.[27] Community-driven standards have also been bolstered by the Comprehensive TeX Archive Network (CTAN), established in 1992 to centralize package distribution and enforce consistent archiving protocols.[28] Initiated by developers including Rainer Schöpf and Sebastian Rahtz, CTAN synchronizes mirrors worldwide, categorizing contributions into directories like macros/latex/contrib to prevent fragmentation and ensure verifiable, versioned access to extensions.[28] This infrastructure, modeled after similar systems like CPAN, has standardized package metadata and licensing, fostering a collaborative ecosystem that aligns with LaTeX's core principles of portability and openness.[28] The LaTeX3 project has contributed to these standards by providing an experimental programming foundation that informs kernel updates, though its full integration remains ongoing.[27]

Technical Overview

Core Typesetting System

LaTeX functions as a high-level macro package layered atop the TeX typesetting engine, where TeX manages the low-level details of character placement, line justification, and page layout, while LaTeX supplies a declarative markup language for structuring documents such as articles, books, and reports.[29][30] This architecture allows LaTeX to abstract TeX's primitives into user-friendly commands, enabling focus on content rather than precise formatting rules.[30] The processing pipeline begins with a LaTeX source file, typically ending in .tex, which is compiled by a TeX engine such as pdfTeX for direct PDF output or XeTeX for Unicode and font support.[31] The engine reads the file token by token, expanding macros and invoking primitives to build a device-independent (DVI) file or PDF, with multiple passes often required to resolve references and counters.[30] LaTeX commands are macros defined using TeX's \def or \newcommand, which expand sequentially during processing into sequences of TeX primitives for rendering.[29][30] This expansion replaces the command with its parameter text, substituting arguments and potentially triggering further expansions until only primitives remain, such as \hbox for horizontal boxes or \glue specifications for spacing.[30][32] TeX operates in distinct modes to handle layout: vertical mode stacks material top-to-bottom, as in page construction, while horizontal mode assembles items side-by-side within lines or boxes.[33] Fundamental to this are boxes, which encapsulate content as indivisible units (e.g., \hbox for horizontal, \vbox for vertical), and glue, stretchable or shrinkable spaces that adjust to fit constraints like line width.[30][33] Recent updates to LaTeX2e, including the 2025-06-01 release, introduced configurable output routines with hooks and sockets for safer customization of page building, along with a new flexible mark mechanism using commands like \InsertMark, \FirstMark, and \LastMark to replace the legacy system.[34] For paragraph shaping, TeX employs the Knuth-Plass algorithm, a dynamic programming approach that minimizes overall "badness" across lines by evaluating feasible breaks at glue points and penalties.[35][36] The line width is governed by the \hsize parameter, and badness for a line is computed as
badness=100×(dhsize)3 \text{badness} = 100 \times \left( \frac{|d|}{hsize} \right)^3
where dd is the deviation (stretch or shrink) needed to fit the line, with penalties added for undesirable breaks like those after the first or before the last line of a paragraph.[35][36] This global optimization ensures justified text with even spacing and controlled hyphenation.[35]

Document classes

LaTeX document classes define the overall structure, layout, and available commands for a document. Every LaTeX file must begin with a \documentclass{...} command, which loads a .cls file that sets defaults for fonts, margins, sectioning commands, page styles, and more.

Standard Document Classes

These come built-in with every LaTeX installation (part of the core latex-base).
ClassPrimary Use CaseKey FeaturesSectioning CommandsBest For
articleShort documents, journal papers, reportsNo chapters; title on first page (or separate with titlepage option); compact\section, \subsection, etc.Research papers, notes, articles
reportLonger technical reports, thesesSupports chapters; one-sided by default; separate title page option\chapter, \section, etc.Theses, project reports
bookFull books or book-length publicationsTwo-sided printing; frontmatter/mainmatter/backmatter; chapters; headers/footers differ on odd/even pages\part, \chapter, \sectionBooks, textbooks, long theses
letterFormal correspondenceSpecial formatting for addresses, date, signature; no sectionsNone (uses \begin{letter} env.)Letters
slidesOld-style presentationsLarge sans-serif fonts; basic slide layout (largely superseded)LimitedSimple slides (use Beamer instead)
procConference proceedingsBased on article with minor tweaks for proceedingsLike articleConference papers
minimalDebugging and testingAlmost nothing: just sets paper size and base font; no fancy formattingNoneTesting packages/classes
  • Beamer: The go-to for professional presentations. Uses "frames" instead of pages, supports overlays, themes, and transitions.
  • memoir: A highly customizable single class that can act like book, report, or article. Excellent for books with fine control over typography, headers, chapter styles, etc.
  • KOMA-Script bundle (scrartcl, scrreprt, scrbook, scrlttr2): Modern alternatives to the standards with better defaults (more whitespace, nicer captions, easier customization).
  • amsart, amsbook, amsproc: From the American Mathematical Society. Tailored for math-heavy papers/journals with specific theorem styles, bibliography handling, etc.
  • Journal-specific classes (e.g., IEEEtran for IEEE, acmart for ACM, elsarticle for Elsevier): Enforce exact formatting required by the publisher.

Common Document Class Options

Options passed in square brackets customize globally, e.g., \documentclass[11pt, a4paper, twoside, twocolumn, draft]{article}
  • Font size: 10pt (default), 11pt, 12pt.
  • Paper size: a4paper, letterpaper, a5paper, etc.
  • Layout: oneside/twoside (book is two-sided by default), twocolumn, landscape.
  • Title page: titlepage/notitlepage (article defaults to no separate title page).
  • Draft mode: draft (shows overfull boxes) vs. final.
  • Others: openright (chapters start on right-hand page), fleqn (flush-left equations), etc.
Options not recognized by the class are passed to loaded packages (global options). Choosing the right class depends on document length, need for chapters, printing sides, and specific formatting requirements. For most beginners, article is recommended for short documents.

Syntax and Commands

LaTeX employs a command-based markup language where instructions for typesetting are given through macros prefixed by a backslash character, \. The standard syntax for a command is \command[optional]{mandatory}, in which the optional argument, if present, is delimited by square brackets [] and precedes the mandatory argument enclosed in curly braces {}. This structure allows flexibility in specifying parameters, with the command name itself consisting of either a sequence of letters (e.g., \section) or a single non-letter character (e.g., \#). Commands are case-sensitive, and some include a starred variant (e.g., \section*) that modifies their behavior, such as suppressing numbering.[37] Commands in LaTeX are broadly categorized into structural, formatting, and mathematical types, each serving distinct roles in document preparation. Structural commands establish the overall framework of the document; for instance, \documentclass{article} specifies the document class at the preamble, selecting predefined formatting options like page layout and font styles, while \begin{document} initiates the body of the text where content is rendered, and \end{document} concludes it. These ensure a consistent typesetting environment from the outset. Formatting commands modify the appearance of text elements, such as \textbf{text} to produce boldface output or \textit{text} to apply italics, applying changes locally within their argument scopes without altering the global structure. Mathematical commands operate within dedicated math modes and include symbols like \alpha for the Greek letter α, enabling precise rendering of equations and expressions.[29][38] In the 2025-11-01 release, new commands were added such as \DeclareMathScriptfontMapping for handling separate script fonts in math mode and \NewStructureName for symbolic structure names in tagged PDF support.[39] Mathematical content in LaTeX is handled through two primary modes: inline math, delimited by single dollar signs $...$, which integrates formulas seamlessly into text lines (e.g., $E = mc^2$), and display math, using the preferred `
......
delimiters for centered, standalone equations with enhanced spacing. The
......
` form is recommended as it integrates better with LaTeX's error-checking mechanisms and supports package extensions. Transitioning into math mode activates specialized typesetting rules, such as automatic spacing around operators and italicization of variables.[40] Recent enhancements in the 2025 releases include improved math tagging in tabular cells and support for MathML attributes via \MathMLintent and \MathMLarg, aiding accessibility in PDF output.[34][39] Environments provide a mechanism to encapsulate blocks of content with specific formatting rules, invoked via the paired commands \begin{environment} ... \end{environment}. The environment name must match exactly between the begin and end declarations; mismatches trigger compilation errors. Common environments include those for lists (e.g., \begin{itemize} \item First point \item Second point \end{itemize} for bulleted lists), tables (e.g., \begin{tabular}{cc} a & b \\ c & d \end{tabular} for aligned columns), and figures (e.g., \begin{figure} \caption{Description} \end{figure} to position and label images). These create grouped scopes where additional commands can apply localized effects, such as alignment or numbering.[41] Among the essential commands for organizing content, \section{Title} generates a numbered section heading and updates the table of contents if applicable, facilitating hierarchical document structure. LaTeX provides a standard sectioning hierarchy: \section > \subsection > \subsubsection > \paragraph > \subparagraph. These commands enable nested subdivisions with automatic hierarchical numbering (e.g., 1 for sections, 1.1 for subsections, 1.1.1 for subsubsections). Subsections cannot be directly nested within other subsections using the \subsection command, as it creates a new entry at the same level; instead, the \subsubsection command is used for deeper levels within a subsection. For instance:
\section{Main Section}
\subsection{Subsection}
Content here.
\subsubsection{Sub-subsection}
Deeper content here.
This results in numbered headings such as "1 Main Section", "1.1 Subsection", and "1.1.1 Sub-subsection".[42][43] Cross-referencing is achieved using \label{key} placed after a numbered element like a section or equation, which stores a unique identifier, and \ref{key} to retrieve the corresponding number in the output (e.g., "See Section \ref{sec:example}"). Multiple passes of the LaTeX processor may be required to resolve references accurately, as labels are defined forward or backward in the source. The \pageref{key} variant provides the page number instead.[44] Syntax errors in LaTeX often arise from structural mismatches, with unmatched braces being particularly prevalent; every opening { must pair with a closing }, as unbalanced delimiters disrupt argument parsing and lead to "Runaway argument?" or "Missing } inserted" messages during compilation. Resolution involves inspecting the error log for the line number indicated, then systematically checking nested braces—tools like syntax highlighters or editors with brace matching (e.g., in TeXShop or Overleaf) aid in locating the discrepancy. Other frequent issues include omitted backslashes before command names or mismatched environment tags, which can be rectified by verifying the source code sequentially from the error point. Proper indentation and commenting can prevent such errors in complex documents.[45][46]

Document Processing Model

The process of creating a LaTeX document begins with editing a source file with the extension .tex using a plain text editor, where users input markup commands to define the document's structure and content.[29] This source file serves as the primary input for the typesetting engine. Compilation is initiated by invoking a LaTeX engine such as latex or pdflatex from the command line or an integrated development environment, which processes the .tex file to generate an output document.[29] During this step, the engine produces auxiliary files, including the .aux file that records information for cross-references, citations, and table of contents (TOC) entries, and the .log file that logs the compilation process, warnings, and errors for debugging.[47] These files are essential for resolving dependencies in complex documents. LaTeX compilation often requires multiple passes over the source file to fully resolve elements like references and TOCs, as initial runs generate incomplete auxiliary data that subsequent passes use to finalize page numbers and hyperlinks.[29] For instance, after the first pass creates the .aux file, a second pass incorporates the resolved references before producing the final output. Bibliography processing integrates into this workflow via tools like BibTeX or the biblatex package; users maintain a separate .bib database of references, run the LaTeX compiler to generate a .aux file with citation queries, then execute BibTeX to produce a .bbl file containing formatted entries, followed by additional LaTeX passes to insert the bibliography.[48] Index and glossary generation follows a similar multi-step procedure using the makeindex utility; after an initial LaTeX run marks index entries in the .aux file, makeindex processes these to create an .ind file, which is then incorporated in a final compilation pass.[49] Traditional LaTeX engines output Device Independent (DVI) files, which can be converted to PDF using tools like dvipdfm or dvipdfmx, whereas pdflatex directly generates PDF output, supporting modern features like embedded fonts and hyperlinks from the outset.[50] Despite the convenience of direct PDF output, the traditional workflow of latexdvipsps2pdf remains relevant for certain applications, particularly those requiring native support for PostScript-based packages. For example, the PSTricks package, which enables the creation of complex vector graphics, diagrams, plots, and special effects directly in LaTeX code via PostScript specials, is processed seamlessly by dvips for high-quality results.[51] In contrast, pdfLaTeX requires workarounds such as the auto-pst-pdf or pst-pdf packages, which involve external compilation steps and can introduce limitations including issues with multi-page documents, slower build times, and compatibility quirks.[52] Similarly, the psfrag package, used to replace text strings in included EPS figures with properly typeset LaTeX text through PostScript manipulation, functions natively in the DVI/PS route but necessitates alternatives or additional tools like pstool when using PDF modes.[53] Additionally, certain older packages such as features in xy-pic or legacy presentation tools like powerdot perform better or require the DVI/PS workflow for full functionality.[54] Rare cases may also demand precise control over PostScript output for specific printers, publishers, or workflows that require pure PS files. As of late 2024, LuaLaTeX has been recommended as the primary engine for LaTeX, extending pdfTeX with an embedded Lua scripting language for dynamic control over typesetting, including advanced font handling with OpenType and TrueType formats, and seamless integration of Lua code for custom automation within the compilation process.[55] The 2025 LaTeX2e releases (June and November) have enhanced PDF output through the Tagged PDF project, enabling better accessibility features such as structure tagging for screen readers, MathML integration for equations, and metadata options via \DocumentMetadata. These updates include default PDF 2.0 support, expanded tagging for graphics (e.g., alt text), and improved paragraph and math tagging mechanisms. Additionally, several legacy packages like enumerate and theorem have been retired in favor of modern alternatives.[34][39][56]

Usage and Examples

Basic Document Structure

A LaTeX document follows a standardized structure divided into a preamble, where setup instructions are provided, and a body, where the actual content resides. This separation ensures that formatting and typesetting rules are defined upfront, allowing the processor to generate a consistent output, such as a PDF. The entire document must be enclosed within the \begin{document} and \end{document} commands to initiate and terminate processing.[29] The preamble precedes the document environment and contains essential declarations. It starts with the \documentclass[options]{class} command, which selects a predefined template for the document type—such as article for short papers, report for longer documents, or book for multi-chapter works—and applies any specified options. Standard options include font sizes of 10pt, 11pt, or 12pt to set the base text size (with 10pt as the default if unspecified), and paper dimensions like a4paper for A4 format or letterpaper for US letter size.[57] Following this, additional functionality is incorporated via \usepackage{packagename} commands, which load extension modules for features like graphics, mathematics, or bibliography management without altering the core structure.[58] Metadata such as the document's title, author, and date is also defined here using \title{title text}, \author{author name}, and \date{date} (with the date optional and defaulting to the compilation time).[29] The document body begins after \begin{document} and holds all user content, including text, sections, figures, and tables structured through commands and environments. To generate a title page or header from the preamble metadata, the \maketitle command is placed early in the body. Front and back matter elements enhance navigation and references: \tableofcontents produces a table of contents based on section headings, \listoffigures lists included images with their captions, and \bibliography{bibfilename} (preceded by \bibliographystyle{style} in the preamble) compiles a bibliography from a .bib file.[29] These components assume standard classes and may require packages like tocloft for customization, though the basic forms suffice for most documents.[58] For a minimal working template using the article class, the following skeleton provides the essential framework:
\documentclass[12pt,a4paper]{article}

\title{Document Title}
\author{Author Name}
\date{\today}

\begin{document}

\maketitle

\tableofcontents

\section{Section One}
Content goes here.

\bibliographystyle{plain}
\bibliography{references}

\end{document}
This example compiles a simple document with a title page, table of contents placeholder, and bibliography stub, assuming a references.bib file exists.[29]

Simple Example

A simple LaTeX document demonstrates the essential elements of typesetting, including the preamble for setup, the document body for content, and basic structural commands for sections, mathematics, and figures. This example creates a short article titled "A Brief Introduction to Mathematics," featuring a section, an inline equation, a displayed equation using Euler's identity, and a placeholder for a figure.[9] To compile such a document, users typically install a TeX distribution, which provides the necessary engines and packages. Common options for beginners include TeX Live, a cross-platform distribution maintained by the TeX Users Group, or MiKTeX, a Windows-focused system with on-demand package installation; both are free and include the pdfLaTeX compiler for generating PDF output from .tex files.[59][60][61] The following is the complete source code for the example document, saved as simple_article.tex:
\documentclass{article}

\title{A Brief Introduction to Mathematics}
\author{John Doe}
\date{\today}

\begin{document}

\maketitle

\section{Key Concepts}

Mathematics often involves fundamental identities. For instance, the number $e$ approximates 2.71828 and is central to calculus.

Euler's identity elegantly connects five constants:

\begin{equation}
e^{i\pi} + 1 = 0
\end{equation}

\begin{figure}[h]
\centering
\rule{5cm}{3cm} % Placeholder for an image
\caption{A diagram illustrating the unit circle in the complex plane.}
\label{fig:complex}
\end{figure}

\end{document}
When compiled with pdfLaTeX, this produces a single-page PDF with a title page section displaying the article's title, author, and current date in large, centered formatting. The body follows with a level-1 heading "Key Concepts" in larger, bold font, followed by a paragraph of plain text. The inline equation renders the value of ee in italicized mathematical notation. The displayed equation appears centered on its own line, typeset in display math mode with proper spacing for the exponential, imaginary unit, pi, and equality. The figure placeholder shows a black rectangle as a stand-in for an image, accompanied by an italicized caption below it; in a real document, this would be replaced by \includegraphics{filename} from the graphicx package, though here it uses core LaTeX for simplicity.[9] Breaking down the code line by line reveals LaTeX's declarative structure, where commands begin with a backslash and the document is processed in a single pass to generate formatted output.[9]
  • \documentclass{article}: Specifies the article class, which sets default page margins, fonts (10pt Computer Modern), and layout for non-book documents; this is the minimal required declaration in the preamble.
  • \title{...}, \author{...}, \date{...}: Define metadata for the title block; these are standard commands in the article class and do not appear until invoked.[9]
  • \begin{document} and \end{document}: Enclose the body, switching from preamble (setup) to content; everything before \begin{document} configures the document class, while the body contains the visible text.[9]
  • \maketitle: Generates the formatted title, author, and date block at the current position, using large centered text.[9]
  • \section{Key Concepts}: Creates a numbered section heading, automatically incrementing the section counter and adding it to the table of contents if enabled; headings use a larger bold font with vertical spacing.
LaTeX's sectioning commands form a hierarchy with automatic numbering. In the article class, the standard commands in descending order are \section (level 1), \subsection (level 2), \subsubsection (level 3), \paragraph (level 4), and \subparagraph (level 5). These commands provide hierarchical numbering such as 1, 1.1, 1.1.1, etc. Nesting is achieved by placing lower-level commands within the content of higher-level ones; subsections cannot be directly nested within other subsections using \subsection (as it creates a new entry at the same level), but \subsubsection is used instead for the next deeper level within a subsection.[42][43] An example demonstrating nested sectioning:
\section{Main Section}
This is the primary section.

\subsection{Subsection}
This is nested within the main section.

\subsubsection{Sub-subsection}
This is a deeper level within the subsection.
This produces headings numbered as "1 Main Section", "1.1 Subsection", and "1.1.1 Sub-subsection".
  • The paragraph text: Plain LaTeX input is automatically hyphenated and justified into lines, with ...... delimiters activating inline math mode for the approximation of ee.[9]
  • \begin{equation} ... \end{equation}: Defines a displayed, centered equation environment, numbering it automatically (e.g., (1)) and rendering symbols like ee, ii, π\pi in professional math italics with proper kerning; this uses core LaTeX math without extensions.
  • \begin{figure}[h] ... \end{figure}: Opens a floating figure environment with [h] specifier requesting "here" placement if possible; \centering aligns content, \rule{5cm}{3cm} draws a simple black rectangle as a placeholder, \caption{...} adds descriptive text below, and \label{fig:complex} enables cross-referencing (e.g., "see Figure~\ref{fig:complex}").
This structure highlights LaTeX's focus on content separation from layout, allowing the engine to handle pagination and floats during compilation, as outlined in the core document model.[9]

Advanced Formatting Techniques

LaTeX provides powerful mechanisms for defining custom commands, enabling users to create reusable macros that simplify complex formatting and promote consistency across documents. The \newcommand primitive allows the definition of new commands with optional arguments, such as \newcommand{\mycmd}[1]{#1 squared}, which can then be invoked as \mycmd{x} to produce "x squared". This feature enhances reusability by encapsulating repetitive structures, reducing errors in professional typesetting.[62] For mathematical content, LaTeX offers advanced environments like align* and equation* from the amsmath package, which facilitate aligned multiline equations without numbering in the starred variants. These environments support precise alignment on operators, such as equals signs, improving readability in derivations. Additionally, the amsthm package enables the declaration of theorem-like environments, such as \newtheorem{theorem}{Theorem}, for structuring proofs and statements in academic writing.[63][64] Tables in LaTeX are constructed using the tabular environment for text-based grids, where column specifications like {lcr} define left, center, or right alignment, as in \begin{tabular}{lcr} a & b & c \ \end{tabular}. For mathematical tables, the array environment operates similarly but within math mode, allowing seamless integration of formulas in cells, such as matrices. Figures are incorporated via the \includegraphics command, which supports scaling and positioning options like \includegraphics[width=0.5\textwidth]{image.png}, enabling professional inclusion of graphics while maintaining document flow.[65][66] Typography in LaTeX can be finely tuned through length parameters, for instance, \setlength{\parindent}{0pt} to suppress indentation at paragraph starts, fostering a modern layout style. Hyphenation patterns, controlled by commands like \hyphenation{man-u-script}, allow explicit breaks for specific words, overriding default language rules to prevent awkward line divisions in justified text. These adjustments ensure optimal spacing and readability in complex documents.[22][67] A representative complex equation, such as solving the quadratic formula, demonstrates multiline derivation capabilities:
\begin{align*}
ax^2 + bx + c &= 0 \\
x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\end{align*}
This uses the align* environment to align steps horizontally, showcasing LaTeX's strength in precise mathematical typesetting.[63]

Ecosystem and Extensions

Packages and Macros

LaTeX significantly extends its core typesetting capabilities through a rich ecosystem of user-contributed packages, primarily distributed via the Comprehensive TeX Archive Network (CTAN). As of November 2025, CTAN hosts 6828 packages, the majority of which are free and compatible with LaTeX, enabling enhancements for graphics, hyperlinks, multilingual support, and more specialized formatting needs.[68] These packages are incorporated into documents using the \usepackage command in the preamble, which loads the specified package and makes its macros available throughout the document. For example, \usepackage{graphicx} provides commands like \includegraphics for embedding images from various formats. The psfrag package complements this by enabling the replacement of text strings in included EPS figures with properly typeset LaTeX text through PostScript manipulation during the dvips step in the traditional LaTeX workflow (latex → dvips → ps2pdf); it is not natively supported in pdfLaTeX and requires workarounds like the pstool package, which may introduce compatibility quirks.[69][70] Meanwhile, \usepackage{hyperref} adds support for interactive elements such as clickable links and bookmarks in PDF outputs.[2] In addition to packages, LaTeX supports macro programming to define custom commands, allowing users to encapsulate complex formatting or repetitive structures into reusable definitions. The TeX primitive \def enables basic macro creation by associating a control sequence with a token sequence, though it risks overwriting existing commands without warning. In contrast, LaTeX's \newcommand offers safer definition by erroring if the command already exists, promoting robust code; for redefinitions, \renewcommand is used. Parameter handling is integral, with mandatory arguments passed in braces and optional ones in brackets, as in \newcommand{\person}[2][Mr.]{\text{#1.~#2}} to default a title if unspecified.[2] Among the most widely adopted packages are those addressing common document requirements in academic and technical writing. The amsmath package, a cornerstone of the AMS-LaTeX bundle, extends LaTeX's mathematical facilities with environments for aligned equations, gathered multiline displays, and improved spacing, essential for rigorous scientific typesetting.[71] Biblatex reimplements LaTeX's bibliography tools, providing flexible citation styles, Unicode compatibility, and integration with the Biber processor for handling complex metadata and sorting schemes.[72] For visualizations, the TikZ frontend to the PGF system allows declarative creation of diagrams, graphs, and illustrations, supporting layers, paths, and nodes for precise, vector-based output without external tools. Another prominent package is PSTricks, which provides an extensive collection of macros for generating PostScript code to create complex vector graphics, diagrams, plots, and special effects directly in LaTeX via PostScript specials. PSTricks integrates seamlessly with the traditional workflow (latex → dvips → ps2pdf) for high-quality results, but requires workarounds like the auto-pst-pdf package when using pdfLaTeX, potentially introducing limitations such as multi-page issues, slower builds, or compatibility quirks.[73][74][75] LaTeX3 advances macro programming via the expl3 module, a dedicated layer for functional-style coding that abstracts TeX primitives into consistent, expandable functions. This module facilitates handling of variables like token lists (tl), sequences (seq), and property lists (prop), enabling modular package development across engines like pdfTeX, XeTeX, and LuaTeX. A representative example is \tl_set:Nn \l_my_tl { content }, which assigns the balanced token list { content } to the local variable \l_my_tl for subsequent manipulation, such as concatenation or conditional processing.[76] Effective use of packages and macros requires adherence to best practices to maintain document stability. To avoid conflicts, packages should be loaded in a deliberate order—such as placing hyperref near the end of the preamble—and LaTeX's hook system can be leveraged to defer code execution regardless of loading sequence. Custom macros benefit from prefixed names (e.g., \mypkg_macro:) to namespace internals and prevent clashes with other contributions. Updates are managed via tlmgr in TeX Live distributions, using tlmgr update --all to synchronize packages from CTAN while options like --backupdir enable versioning to revert incompatible changes.[77][78][79] Overleaf is a cloud-based LaTeX editor that supports real-time collaboration among multiple users, eliminating the need for local installations and enabling seamless version control through integrated history tracking.[80] TeXstudio provides a graphical user interface (GUI) for LaTeX editing, featuring auto-completion for commands, syntax highlighting, and an integrated PDF viewer to facilitate efficient document compilation and preview.[81] Similarly, the LaTeX Workshop extension for Visual Studio Code enhances the editor with features like live preview, auto-compilation, and intelligent autocomplete, making it a popular choice for developers integrating LaTeX into broader coding workflows.[82] TeX Live serves as a cross-platform distribution bundle for LaTeX, offering comprehensive support for Unix-like systems, Windows, and macOS with annual releases that include updated packages, fonts, and binaries to ensure compatibility across diverse environments. TeX Live 2025, released in September 2025, includes the LaTeX kernel update from June 2025 with improvements in performance and accessibility, such as enhanced tagged PDFs for screen readers.[60][16][34] In contrast, MiKTeX is tailored primarily for Windows users, providing an on-demand package installation system that automatically downloads and installs required components during compilation, reducing initial setup overhead.[61] Auxiliary tools like BibDesk streamline bibliography management for LaTeX users on macOS by serving as a graphical BibTeX editor that allows importing, organizing, and exporting references with support for formatted previews and integration with LaTeX documents. LyX offers a WYSIWYM (What You See Is What You Mean) interface that abstracts LaTeX syntax while generating underlying code, enabling users to focus on document structure through a graphical layout without direct command editing.[83] As of 2025, AI-assisted integrations such as GitHub Copilot have gained traction for LaTeX code generation, providing inline suggestions for commands, templates, and even full sections within compatible editors like VS Code to accelerate authoring.[84] Workflow enhancers like Git enable version control for LaTeX projects by tracking changes in .tex files, facilitating branching for collaborative revisions and merging without conflicts in text-based content.

Compatibility and Conversion

LaTeX's input compatibility varies across its underlying engines. The traditional pdfLaTeX engine relies on legacy 7-bit character encoding, limiting it to 256-character font files and requiring inputenc or manual encoding declarations for non-ASCII characters, which can complicate Unicode handling.[85][86] In contrast, XeLaTeX and LuaTeX provide native Unicode support, enabling direct processing of UTF-8 input without additional encoding packages and allowing seamless integration of international scripts through system fonts.[87][88][89] For output conversion, several tools facilitate transforming LaTeX documents into other formats. Pandoc serves as a versatile converter, supporting bidirectional translation between LaTeX and formats like Markdown, HTML, and Docx while preserving mathematical expressions via MathML or similar embeddings.[90] LaTeXML converts LaTeX to HTML or XML, emphasizing semantic markup for web accessibility and scholarly publishing, often outperforming simpler tools in handling complex layouts.[91] Detex, a lightweight utility, strips LaTeX markup to produce plain text output, primarily for tasks like spell-checking or indexing without rendering. Cross-engine support introduces variances, particularly in font handling. PdfTeX offers limited support for modern font formats, restricting users to Type 1 or legacy TrueType subsets and excluding native OpenType features like advanced glyph substitution. LuaTeX, however, integrates robust OpenType handling through its Lua scripting layer, enabling features such as variable fonts and complex script shaping directly from system-installed files via the fontspec package.[92][93][89] These differences can affect portability, as documents optimized for LuaTeX may require adjustments when compiled with pdfTeX due to incompatible font metrics. LaTeX has inherent limitations in direct support for right-to-left (RTL) languages like Arabic or Hebrew, where pdfLaTeX struggles with bidirectional text flow and requires extensive workarounds. Even with XeLaTeX or LuaTeX, core support is absent without packages such as polyglossia, which extends babel-like functionality for multilingual RTL typesetting but still demands careful font and script configuration to avoid alignment issues.[88][94] As of 2025, advancements in EPUB export have enhanced LaTeX's interoperability with digital publishing. The tex4ebook bundle, built on TeX4ht, now offers improved conversion to EPUB 3 formats, including better handling of multimedia, hyperlinks, and accessibility features like MathML for equations, making it suitable for reflowable ebooks from complex LaTeX sources.[95][96]

Distribution and Community

Licensing and Distribution

LaTeX is distributed under the LaTeX Project Public License (LPPL), a free software license introduced in 1999 with version 1.2 and currently at version 1.3c.[97][98] The LPPL permits users to copy, distribute, and modify the software, provided that the original name is preserved unless substantial changes are made that alter its core functionality.[97] In contrast, the underlying TeX system, developed by Donald Knuth, is released into the public domain, allowing unrestricted use and modification without licensing restrictions.[99] The primary distribution channel for LaTeX and related TeX materials is the Comprehensive TeX Archive Network (CTAN), a centralized repository hosted at ctan.org and mirrored at numerous sites worldwide to ensure global accessibility and redundancy.[100][101] A key distribution is TeX Live, a free, multi-platform collection that includes the LaTeX kernel, packages, fonts, and tools, supporting Unix-like systems, Windows, and macOS.[60] TeX Live is updated annually, with the 2025 release issued on March 8, 2025, incorporating ongoing security patches and enhancements through its package manager.[60] While the core LaTeX software incurs no fees, commercial services offer paid support and advanced features; for instance, Overleaf provides a Pro subscription for enhanced collaboration tools, increased storage, and priority assistance.[102] To maintain compatibility and avoid confusion, the LPPL requires derivative works to adopt distinct names, such as "fooLaTeX," when modifications are significant enough to warrant rebranding.[97]

Version History

LaTeX 2.09, the original widely available version released in 1985, served as the foundational implementation of the LaTeX typesetting system but was inherently non-extensible, limiting its adaptability for future enhancements without significant rewrites.[103] This version relied on a fixed structure, making it suitable for basic document preparation in academic and scientific contexts during the 1980s and early 1990s, yet it lacked mechanisms for modular package loading or kernel updates.[104] In June 1994, LaTeX2e was introduced as a major revision, replacing LaTeX 2.09 and establishing the current kernel architecture that remains in use today.[62] Key innovations included the \NeedsTeXFormat command to specify required format versions, enabling better dependency management, and a design that supported ongoing maintenance through periodic releases rather than full overhauls.[105] Since its inception, LaTeX2e has followed a biannual release cycle (June and November) starting from 2015, with each update dated nominally (e.g., 2025/11/01 for the latest as of November 2025) and often including patch levels for minor fixes.[105] For instance, the 2025/06/01 release addressed LuaTeX-specific issues by integrating automatic MathML generation for tagged mathematics, improving accessibility in PDF 2.0 output while maintaining compatibility with earlier engines.[106] Developments under the LaTeX3 umbrella, initiated as an experimental extension to the core system, have progressively integrated advanced features into LaTeX2e.[27] Notable progress includes the 2020 incorporation of the L3 programming layer into the kernel for enhanced modularity and the introduction of experimental tagging mechanisms in 2023–2025 to support accessible PDF output via commands like \DocumentMetadata{... tagging = on}. These tags, currently optional and engine-dependent (e.g., via LuaTeX), aim to automate structure for screen readers without disrupting existing workflows.[34] Earlier LaTeX3 efforts, such as hook management in 2020, further underscore the shift toward a more extensible foundation. To ensure backward compatibility with legacy documents, LaTeX2e provides modes like \usepackage{latex209}, which emulates the behavior of the 2.09 version by loading a dedicated configuration file and suppressing newer features.[107] The latexrelease package, added in 2015, allows users to emulate specific past or future kernel versions, facilitating smooth transitions during updates. Over time, LaTeX2e has deprecated several obsolete commands to promote robust coding practices, such as phasing out \bf in favor of \textbf for semantic bold formatting, deprecated and removed from the kernel since LaTeX2e in 1994 with warnings issued when used.[34] Similar deprecations, including the retirement of legacy mark interfaces in 2025, consolidate older code paths into modern equivalents, reducing maintenance overhead while preserving compatibility options.[106]

Adoption and Impact

LaTeX has achieved dominant status in academic publishing, particularly in fields requiring precise mathematical typesetting such as mathematics, physics, and computer science. Major organizations like the American Mathematical Society (AMS) and the Institute of Electrical and Electronics Engineers (IEEE) provide official LaTeX templates and support for journal submissions, making it the de facto standard for their publications.[108][109] Similarly, approximately 90% of submissions to arXiv, a primary repository for STEM preprints, are in TeX format, predominantly LaTeX, underscoring its prevalence in scientific communication by 2025.[110] In industry applications, LaTeX is extensively used for technical documentation in high-stakes environments. Organizations such as NASA maintain dedicated LaTeX documentation systems and templates for reports and papers, facilitating consistent formatting of complex engineering and scientific content.[111] At CERN, LaTeX is integrated into collaborative workflows, with official guidelines and access to tools like Overleaf for document preparation, including style guides for experiments like ATLAS.[112][113] Leading publishers, including Springer Nature and Elsevier, offer comprehensive LaTeX authoring support and templates, enabling seamless integration into their production pipelines for books and journals.[114][115] LaTeX's impact extends beyond direct usage, revolutionizing mathematical rendering in digital formats. Its syntax for equations and symbols has directly influenced web-based tools like MathJax, which processes LaTeX markup to display high-quality mathematics in browsers, supporting accessible online scholarly content.[116] The TeX Users Group (TUG), founded in 1980, has fostered this growth through annual international conferences and resources, while online communities like TeX - LaTeX Stack Exchange provide robust support with millions of questions answered.[117][118][119] Despite its strengths, LaTeX faces challenges, notably a steep learning curve that can deter newcomers due to its markup-based syntax and debugging requirements. This has led to the adoption of simpler alternatives like Markdown in fields with less emphasis on complex mathematics, where tools like Pandoc enable conversion to LaTeX for final formatting when needed.[120][121]

References

User Avatar
No comments yet.