TeX
typesetting system
≈ 4 min read
TeX. encyclopegia.org, snapshot tex-000593-b013be3e3b2ebf87. /a/tex
Names in other languages
- bgTeX
- bsTeX
- caTeX
- DeutschTeX
- EnglishTeX
- ItalianoTeX
- RomânăTeX
- العربيةتخ
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
TeX ( ), stylized as , is a free and open source software typesetting program that was designed and written by computer scientist and Stanford University professor Donald Knuth and first released in 19781. The term now refers to the system of extensions – which includes software programs called TeX engines, sets of TeX macros, and packages which provide extra typesetting functionality – built around the original TeX language.
TeX is a popular means of typesetting complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems. TeX is widely used in academia, especially in mathematics, computer science, economics, political science, engineering, linguistics, physics, statistics, and quantitative psychology.
It has long since displaced Unix troff (the previously favored formatting system) in most Unix installations (although troff still remains as the default formatter of the UNIX documentation). It is also used for many other typesetting tasks, especially as the basis for LaTeX, ConTeXt, and other macro packages.
Works
TeX was designed with two main goals in mind: to allow anybody to produce high-quality books with minimal effort, and to provide a system that would give exactly the same results on all computers, at any point in time (together with the Metafont language for font description and the Computer Modern family of typefaces). TeX is free software, which made it accessible to a wide range of users.
Hello, World \bye % marks the end of the file; not shown in the final output This might be in a file myfile.tex, as .tex is a common file extension for plain TeX files. By default, everything that follows a percent sign on a line is a comment, ignored by TeX.
Running TeX on this file (for example, by typing tex myfile.tex in a command-line interpreter, or by calling it from a graphical user interface) will create an output file called myfile.dvi, representing the content of the page in a device independent format (DVI). A DVI file could then be either viewed on screen or converted to a suitable format for any of the various printers for which a device driver existed (printer support was generally not an operating system feature at the time that TeX was created).
Knuth has said that there is nothing inherent in TeX that requires DVI as the output format, and later versions of TeX, notably pdfTeX, XeTeX, and LuaTeX, all support output directly to PDF. TeX provides a different text syntax specifically for mathematical formulas.
For example, the quadratic formula (which is the solution of the quadratic equation) appears as: The formula is printed in a way a person would write by hand, or typeset the equation. In a document, entering mathematics mode is done by starting with a $ symbol, then entering a formula in TeX syntax, and closing again with another of the same symbol.
Knuth explained in jest that he chose the dollar sign to indicate the beginning and end of mathematical mode in plain TeX because typesetting mathematics was traditionally supposed to be expensive. Display mathematics (mathematics presented centred on a new line) is similar but uses $$ instead of a single $ symbol. For example, the above with the quadratic formula in display math:
Text derived from https://en.wikipedia.org/w/index.php?oldid=1377201099 under CC BY-SA 4.0; modifications have been made.
References
- ↩Wikipedia “TeX” release date (×1) · confidence 0.95 revision URL