TeX, short for TeX Typesetting System, is a typesetting language and system created by Donald Knuth in 1978 for producing high-quality, publication-ready documents with precise control over layout, fonts, and mathematical formulas. TeX is widely used in academia, scientific publications, and technical documentation, especially for documents containing complex mathematical expressions. It can be installed via distributions like TeX Live on Linux and Windows or MacTeX on macOS, with official downloads and documentation available at TeX Live and MacTeX.
TeX exists to provide precise typographic control that traditional word processors cannot achieve. Its design philosophy emphasizes reproducibility, consistency, and high-quality rendering of complex documents. By separating content from presentation and using declarative markup, TeX allows authors to focus on logical structure and mathematical correctness, ensuring documents can be typeset reliably across different systems and outputs.
TeX: Document Structure
TeX documents are structured into preamble and body sections, where the preamble defines formatting, packages, and document class, and the body contains the text and commands.
% Define document class and packages
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
% Begin document
\begin{document}
Hello, world!
\end{document}The preamble sets up the environment, while the document body contains content marked with TeX commands that control layout, sections, and special symbols.
TeX: Mathematical Typesetting
TeX excels at rendering mathematical expressions using commands such as \frac, \sum, and \int to define fractions, summations, and integrals.
% Display a quadratic formula
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]Math commands produce high-quality equations and symbols. Inline math uses $...$ while display math uses \[...\], giving authors control over equation alignment and spacing.
TeX: Lists and Environments
TeX provides environments like itemize, enumerate, and description for structured lists.
\begin{itemize}
\item First item
\item Second item
\item Third item
\end{itemize}Environments encapsulate repeated or structured content, allowing consistent formatting and indentation, which is critical in technical and academic documents.
TeX: Figures and Tables
Figures and tables are managed using figure and table environments with commands like \includegraphics for images and \caption for captions.
\begin{figure}[h]
\centering
\includegraphics[width=0.5\textwidth]{example-image}
\caption{Sample figure}
\end{figure}These environments allow precise placement, labeling, and referencing of visual content, integrating seamlessly with the text for professional publication quality.
TeX is used in academic papers, theses, books, and technical documentation where precise typesetting is required. It integrates with tools like LaTeX, MiKTeX, and Overleaf for collaborative editing and additional functionality, making it a cornerstone in scientific and technical publishing.