TeX

# TeX

Discussion

Encyclopedia
TeX is a typesetting
Typesetting
Typesetting is the composition of text by means of types.Typesetting requires the prior process of designing a font and storing it in some manner...

system designed and mostly written by Donald Knuth
Donald Knuth
Donald Ervin Knuth is a computer scientist and Professor Emeritus at Stanford University.He is the author of the seminal multi-volume work The Art of Computer Programming. Knuth has been called the "father" of the analysis of algorithms...

and released in 1978. Within the typesetting system, its name is formatted as .

Together with the Metafont
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

language for font description and the Computer Modern
Computer Modern
Computer Modern is the family of typefaces used by default by the typesetting program TeX. It was created by Donald Knuth with his METAFONT program, and was most recently updated in 1992. However, the family font was superseded by CM-Super , the latest release dating 2008...

family of typeface
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

s, TeX was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonable amount of effort, and to provide a system that would give exactly the same results on all computers, now and in the future.

TeX is one popular means by which to typeset complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems in the world. TeX is popular in academia
Academia is the community of students and scholars engaged in higher education and research.-Etymology:The word comes from the akademeia in ancient Greece. Outside the city walls of Athens, the gymnasium was made famous by Plato as a center of learning...

, especially in mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, economics
Economics
Economics is the social science that analyzes the production, distribution, and consumption of goods and services. The term economics comes from the Ancient Greek from + , hence "rules of the house"...

, engineering
Engineering
Engineering is the discipline, art, skill and profession of acquiring and applying scientific, mathematical, economic, social, and practical knowledge, in order to design and build structures, machines, devices, systems, materials and processes that safely realize improvements to the lives of...

, physics
Physics
Physics is a natural science that involves the study of matter and its motion through spacetime, along with related concepts such as energy and force. More broadly, it is the general analysis of nature, conducted in order to understand how the universe behaves.Physics is one of the oldest academic...

, statistics
Statistics
Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

, and quantitative psychology
Quantitative psychology
Research in quantitative psychology develops psychological theory in relation to mathematics and statistics. Psychological research requires the elaboration of existing methods and the development of new concepts, so that quantitative psychology requires more than "applications" of statistics and...

. It has largely displaced Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

troff
Troff
troff is a document processing system developed by AT&T for the Unix operating system.-History:troff can trace its origins back to a text formatting program called RUNOFF, written by Jerome H. Saltzer for MIT's CTSS operating system in the mid-1960s...

, the other favored formatter, in many Unix installations, which use both for different purposes. It is now also being used for many other typesetting tasks, especially in the form of LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

and other template packages.

The widely used MIME type for TeX is application/x-tex. TeX is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

.

## History

When the first volume of Knuth's The Art of Computer Programming
The Art of Computer Programming
The Art of Computer Programming is a comprehensive monograph written by Donald Knuth that covers many kinds of programming algorithms and their analysis....

was published in 1969, it was typeset using hot metal type set by a Monotype Corporation
Monotype Corporation
Monotype Imaging Holdings is a Delaware corporation based in Woburn, Massachusetts and specializing in typesetting and typeface design as well as text and imaging solutions for use with consumer electronics devices. Monotype Imaging Holdings is the owner of Monotype Imaging Inc., Linotype,...

typecaster with a hot metal typesetting
Hot metal typesetting
In printing and typography, hot metal typesetting refers to 19th-century technologies for typesetting text in letterpress printing. This method injects molten type metal into a mold that has the shape of one or more glyphs...

machine from the 19th century which produced a "good classic style" appreciated by Knuth. When the second edition of the second volume was published, in 1976, the whole book had to be typeset again because the Monotype technology had been largely replaced by photographic techniques, and the original fonts were no longer available. However, when Knuth received the galley proof
Galley proof
In printing and publishing, proofs are the preliminary versions of publications meant for review by authors, editors, and proofreaders, often with extra wide margins. Galley proofs may be uncut and unbound, or in some cases electronic...

s of the new book on 30 March 1977, he found them awful. Around that time, Knuth saw for the first time the output of a high-quality digital typesetting system, and became interested in digital typography. The disappointing galley proofs gave him the final motivation to solve the problem at hand once and for all by designing his own typesetting system. On May 13, 1977, he wrote a memo to himself describing the basic features of TeX.

He planned to finish it on his sabbatical
Sabbatical year
Sabbatical or a sabbatical is a rest from work, or a hiatus, often lasting from two months to a year. The concept of sabbatical has a source in shmita, described several places in the Bible...

in 1978, but as it happened the language wasn't frozen
Freeze (software engineering)
In software engineering, a freeze is a point in time in the development process after which the rules for making changes to the source code or related resources become more strict, or the period during which those rules are applied...

until 1989, more than ten years later. Guy Steele
Guy L. Steele, Jr.
Guy Lewis Steele Jr. , also known as "The Great Quux", and GLS , is an American computer scientist who has played an important role in designing and documenting several computer programming languages.-Biography:...

happened to be at Stanford
Stanford University
The Leland Stanford Junior University, commonly referred to as Stanford University or Stanford, is a private research university on an campus located near Palo Alto, California. It is situated in the northwestern Santa Clara Valley on the San Francisco Peninsula, approximately northwest of San...

during the summer of 1978, when Knuth was developing his first version of TeX. When Steele returned to MIT
Massachusetts Institute of Technology
The Massachusetts Institute of Technology is a private research university located in Cambridge, Massachusetts. MIT has five schools and one college, containing a total of 32 academic departments, with a strong emphasis on scientific and technological education and research.Founded in 1861 in...

that autumn, he rewrote TeX's I/O to run under the ITS
Incompatible Timesharing System
ITS, the Incompatible Timesharing System , was an early, revolutionary, and influential time-sharing operating system from MIT; it was developed principally by the Artificial Intelligence Laboratory at MIT, with some help from Project MAC.In addition to being technically influential ITS, the...

operating system. The first version of TeX was written in the SAIL programming language
SAIL programming language
SAIL, the Stanford Artificial Intelligence Language, was developed by Dan Swinehart and Bob Sproull of the Stanford AI Lab in 1970. It was originally a large ALGOL 60-like language for the PDP-10 and DECSYSTEM-20....

to run on a PDP-10
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...

under Stanford's WAITS
WAITS
WAITS was a heavily-modified variant of Digital Equipment Corporation's Monitor operating system for the PDP-6 and PDP-10 mainframe computers, used at the Stanford Artificial Intelligence Laboratory up until 1990; the mainframe computer it ran on also went by the name of "SAIL".There was never an...

operating system. For later versions of TeX, Knuth invented the concept of literate programming
Literate programming
Literate programming is an approach to programming introduced by Donald Knuth as an alternative to the structured programming paradigm of the 1970s....

, a way of producing compilable source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

and cross-linked documentation typeset in TeX from the same original file. The language used is called WEB
WEB
WEB is a computer programming system created by Donald E. Knuth as the first implementation of what he called "literate programming": the idea that one could create software as works of literature, by embedding source code inside descriptive text, rather than the reverse , in an order that is...

and produces programs in DEC PDP-10 Pascal.

A new version of TeX, rewritten from scratch and called TeX82, was published in 1982. Among other changes, the original hyphenation algorithm
Hyphenation algorithm
A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen...

was replaced by a new algorithm written by Frank Liang. TeX82 also uses fixed-point arithmetic
Fixed-point arithmetic
In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point...

instead of floating-point, to ensure reproducibility of the results across different computer hardware, and includes a real, Turing-complete
Turing completeness
In computability theory, a system of data-manipulation rules is said to be Turing complete or computationally universal if and only if it can be used to simulate any single-taped Turing machine and thus in principle any computer. A classic example is the lambda calculus...

programming language, following intense lobbying by Guy Steele.

In 1989, Donald Knuth released new versions of TeX and METAFONT
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

. Despite his desire to keep the program stable, Knuth realised that 128 different characters for the text input were not enough to accommodate foreign languages; the main change in version 3.0 of TeX is thus the ability to work with 8-bits inputs, allowing 256 different characters in the text input.

Since version 3, TeX has used an idiosyncratic version numbering system, where updates have been indicated by adding an extra digit at the end of the decimal, so that the version number asymptotically
Asymptote
In analytic geometry, an asymptote of a curve is a line such that the distance between the curve and the line approaches zero as they tend to infinity. Some sources include the requirement that the curve may not cross the line infinitely often, but this is unusual for modern authors...

approaches
Pi
' is a mathematical constant that is the ratio of any circle's circumference to its diameter. is approximately equal to 3.14. Many formulae in mathematics, science, and engineering involve , which makes it one of the most important mathematical constants...

. This is a reflection of the fact that TeX is now very stable, and only minor updates are anticipated. The current version of TeX is 3.1415926; it was last updated in March 2008. The design was frozen after version 3.0, and no new feature or fundamental change will be added, so all newer versions will contain only bug
Software bug
A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's...

fixes. Even though Donald Knuth himself has suggested a few areas in which TeX could have been improved, he indicated that he firmly believes that having an unchanged system that will produce the same output now and in the future is more important than introducing new features. For this reason, he has stated that the "absolutely final change (to be made after my death)" will be to change the version number to , at which point all remaining bugs will become features.
Likewise, versions of METAFONT after 2.0 asymptotically approach
{{For|help displaying mathematical formulae in Wikipedia|Help:Displaying a formula}}
TeX (icon as in
Greek
Modern Greek
Modern Greek refers to the varieties of the Greek language spoken in the modern era. The beginning of the "modern" period of the language is often symbolically assigned to the fall of the Byzantine Empire in 1453, even though that date marks no clear linguistic boundary and many characteristic...

, but often pronounced ˈ in English
English language
English is a West Germanic language that arose in the Anglo-Saxon kingdoms of England and spread into what was to become south-east Scotland under the influence of the Anglian medieval kingdom of Northumbria...

) is a typesetting
Typesetting
Typesetting is the composition of text by means of types.Typesetting requires the prior process of designing a font and storing it in some manner...

system designed and mostly written by Donald Knuth
Donald Knuth
Donald Ervin Knuth is a computer scientist and Professor Emeritus at Stanford University.He is the author of the seminal multi-volume work The Art of Computer Programming. Knuth has been called the "father" of the analysis of algorithms...

and released in 1978. Within the typesetting system, its name is formatted as {{TeX}}.

Together with the Metafont
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

language for font description and the Computer Modern
Computer Modern
Computer Modern is the family of typefaces used by default by the typesetting program TeX. It was created by Donald Knuth with his METAFONT program, and was most recently updated in 1992. However, the family font was superseded by CM-Super , the latest release dating 2008...

family of typeface
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

s, TeX was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonable amount of effort, and to provide a system that would give exactly the same results on all computers, now and in the future.

TeX is one popular means by which to typeset complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems in the world. TeX is popular in academia
Academia is the community of students and scholars engaged in higher education and research.-Etymology:The word comes from the akademeia in ancient Greece. Outside the city walls of Athens, the gymnasium was made famous by Plato as a center of learning...

, especially in mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, economics
Economics
Economics is the social science that analyzes the production, distribution, and consumption of goods and services. The term economics comes from the Ancient Greek from + , hence "rules of the house"...

, engineering
Engineering
Engineering is the discipline, art, skill and profession of acquiring and applying scientific, mathematical, economic, social, and practical knowledge, in order to design and build structures, machines, devices, systems, materials and processes that safely realize improvements to the lives of...

, physics
Physics
Physics is a natural science that involves the study of matter and its motion through spacetime, along with related concepts such as energy and force. More broadly, it is the general analysis of nature, conducted in order to understand how the universe behaves.Physics is one of the oldest academic...

, statistics
Statistics
Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

, and quantitative psychology
Quantitative psychology
Research in quantitative psychology develops psychological theory in relation to mathematics and statistics. Psychological research requires the elaboration of existing methods and the development of new concepts, so that quantitative psychology requires more than "applications" of statistics and...

. It has largely displaced Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

troff
Troff
troff is a document processing system developed by AT&T for the Unix operating system.-History:troff can trace its origins back to a text formatting program called RUNOFF, written by Jerome H. Saltzer for MIT's CTSS operating system in the mid-1960s...

, the other favored formatter, in many Unix installations, which use both for different purposes. It is now also being used for many other typesetting tasks, especially in the form of LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

and other template packages.

The widely used MIME type for TeX is application/x-tex. TeX is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

.

## History

When the first volume of Knuth's The Art of Computer Programming
The Art of Computer Programming
The Art of Computer Programming is a comprehensive monograph written by Donald Knuth that covers many kinds of programming algorithms and their analysis....

was published in 1969, it was typeset using hot metal type set by a Monotype Corporation
Monotype Corporation
Monotype Imaging Holdings is a Delaware corporation based in Woburn, Massachusetts and specializing in typesetting and typeface design as well as text and imaging solutions for use with consumer electronics devices. Monotype Imaging Holdings is the owner of Monotype Imaging Inc., Linotype,...

typecaster with a hot metal typesetting
Hot metal typesetting
In printing and typography, hot metal typesetting refers to 19th-century technologies for typesetting text in letterpress printing. This method injects molten type metal into a mold that has the shape of one or more glyphs...

machine from the 19th century which produced a "good classic style" appreciated by Knuth. When the second edition of the second volume was published, in 1976, the whole book had to be typeset again because the Monotype technology had been largely replaced by photographic techniques, and the original fonts were no longer available. However, when Knuth received the galley proof
Galley proof
In printing and publishing, proofs are the preliminary versions of publications meant for review by authors, editors, and proofreaders, often with extra wide margins. Galley proofs may be uncut and unbound, or in some cases electronic...

s of the new book on 30 March 1977, he found them awful. Around that time, Knuth saw for the first time the output of a high-quality digital typesetting system, and became interested in digital typography. The disappointing galley proofs gave him the final motivation to solve the problem at hand once and for all by designing his own typesetting system. On May 13, 1977, he wrote a memo to himself describing the basic features of TeX.

He planned to finish it on his sabbatical
Sabbatical year
Sabbatical or a sabbatical is a rest from work, or a hiatus, often lasting from two months to a year. The concept of sabbatical has a source in shmita, described several places in the Bible...

in 1978, but as it happened the language wasn't frozen
Freeze (software engineering)
In software engineering, a freeze is a point in time in the development process after which the rules for making changes to the source code or related resources become more strict, or the period during which those rules are applied...

until 1989, more than ten years later. Guy Steele
Guy L. Steele, Jr.
Guy Lewis Steele Jr. , also known as "The Great Quux", and GLS , is an American computer scientist who has played an important role in designing and documenting several computer programming languages.-Biography:...

happened to be at Stanford
Stanford University
The Leland Stanford Junior University, commonly referred to as Stanford University or Stanford, is a private research university on an campus located near Palo Alto, California. It is situated in the northwestern Santa Clara Valley on the San Francisco Peninsula, approximately northwest of San...

during the summer of 1978, when Knuth was developing his first version of TeX. When Steele returned to MIT
Massachusetts Institute of Technology
The Massachusetts Institute of Technology is a private research university located in Cambridge, Massachusetts. MIT has five schools and one college, containing a total of 32 academic departments, with a strong emphasis on scientific and technological education and research.Founded in 1861 in...

that autumn, he rewrote TeX's I/O to run under the ITS
Incompatible Timesharing System
ITS, the Incompatible Timesharing System , was an early, revolutionary, and influential time-sharing operating system from MIT; it was developed principally by the Artificial Intelligence Laboratory at MIT, with some help from Project MAC.In addition to being technically influential ITS, the...

operating system. The first version of TeX was written in the SAIL programming language
SAIL programming language
SAIL, the Stanford Artificial Intelligence Language, was developed by Dan Swinehart and Bob Sproull of the Stanford AI Lab in 1970. It was originally a large ALGOL 60-like language for the PDP-10 and DECSYSTEM-20....

to run on a PDP-10
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...

under Stanford's WAITS
WAITS
WAITS was a heavily-modified variant of Digital Equipment Corporation's Monitor operating system for the PDP-6 and PDP-10 mainframe computers, used at the Stanford Artificial Intelligence Laboratory up until 1990; the mainframe computer it ran on also went by the name of "SAIL".There was never an...

operating system. For later versions of TeX, Knuth invented the concept of literate programming
Literate programming
Literate programming is an approach to programming introduced by Donald Knuth as an alternative to the structured programming paradigm of the 1970s....

, a way of producing compilable source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

and cross-linked documentation typeset in TeX from the same original file. The language used is called WEB
WEB
WEB is a computer programming system created by Donald E. Knuth as the first implementation of what he called "literate programming": the idea that one could create software as works of literature, by embedding source code inside descriptive text, rather than the reverse , in an order that is...

and produces programs in DEC PDP-10 Pascal.

A new version of TeX, rewritten from scratch and called TeX82, was published in 1982. Among other changes, the original hyphenation algorithm
Hyphenation algorithm
A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen...

was replaced by a new algorithm written by Frank Liang. TeX82 also uses fixed-point arithmetic
Fixed-point arithmetic
In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point...

instead of floating-point, to ensure reproducibility of the results across different computer hardware, and includes a real, Turing-complete
Turing completeness
In computability theory, a system of data-manipulation rules is said to be Turing complete or computationally universal if and only if it can be used to simulate any single-taped Turing machine and thus in principle any computer. A classic example is the lambda calculus...

programming language, following intense lobbying by Guy Steele.

In 1989, Donald Knuth released new versions of TeX and METAFONT
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

. Despite his desire to keep the program stable, Knuth realised that 128 different characters for the text input were not enough to accommodate foreign languages; the main change in version 3.0 of TeX is thus the ability to work with 8-bits inputs, allowing 256 different characters in the text input.

Since version 3, TeX has used an idiosyncratic version numbering system, where updates have been indicated by adding an extra digit at the end of the decimal, so that the version number asymptotically
Asymptote
In analytic geometry, an asymptote of a curve is a line such that the distance between the curve and the line approaches zero as they tend to infinity. Some sources include the requirement that the curve may not cross the line infinitely often, but this is unusual for modern authors...

approaches {{pi}}
Pi
' is a mathematical constant that is the ratio of any circle's circumference to its diameter. is approximately equal to 3.14. Many formulae in mathematics, science, and engineering involve , which makes it one of the most important mathematical constants...

. This is a reflection of the fact that TeX is now very stable, and only minor updates are anticipated. The current version of TeX is 3.1415926; it was last updated in March 2008. The design was frozen after version 3.0, and no new feature or fundamental change will be added, so all newer versions will contain only bug
Software bug
A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's...

fixes. Even though Donald Knuth himself has suggested a few areas in which TeX could have been improved, he indicated that he firmly believes that having an unchanged system that will produce the same output now and in the future is more important than introducing new features. For this reason, he has stated that the "absolutely final change (to be made after my death)" will be to change the version number to {{pi}}, at which point all remaining bugs will become features.
Likewise, versions of METAFONT after 2.0 asymptotically approach
{{For|help displaying mathematical formulae in Wikipedia|Help:Displaying a formula}}
TeX (icon as in
Greek
Modern Greek
Modern Greek refers to the varieties of the Greek language spoken in the modern era. The beginning of the "modern" period of the language is often symbolically assigned to the fall of the Byzantine Empire in 1453, even though that date marks no clear linguistic boundary and many characteristic...

, but often pronounced ˈ in English
English language
English is a West Germanic language that arose in the Anglo-Saxon kingdoms of England and spread into what was to become south-east Scotland under the influence of the Anglian medieval kingdom of Northumbria...

) is a typesetting
Typesetting
Typesetting is the composition of text by means of types.Typesetting requires the prior process of designing a font and storing it in some manner...

system designed and mostly written by Donald Knuth
Donald Knuth
Donald Ervin Knuth is a computer scientist and Professor Emeritus at Stanford University.He is the author of the seminal multi-volume work The Art of Computer Programming. Knuth has been called the "father" of the analysis of algorithms...

and released in 1978. Within the typesetting system, its name is formatted as {{TeX}}.

Together with the Metafont
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

language for font description and the Computer Modern
Computer Modern
Computer Modern is the family of typefaces used by default by the typesetting program TeX. It was created by Donald Knuth with his METAFONT program, and was most recently updated in 1992. However, the family font was superseded by CM-Super , the latest release dating 2008...

family of typeface
Typeface
In typography, a typeface is the artistic representation or interpretation of characters; it is the way the type looks. Each type is designed and there are thousands of different typefaces in existence, with new ones being developed constantly....

s, TeX was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonable amount of effort, and to provide a system that would give exactly the same results on all computers, now and in the future.

TeX is one popular means by which to typeset complex mathematical formulae; it has been noted as one of the most sophisticated digital typographical systems in the world. TeX is popular in academia
Academia is the community of students and scholars engaged in higher education and research.-Etymology:The word comes from the akademeia in ancient Greece. Outside the city walls of Athens, the gymnasium was made famous by Plato as a center of learning...

, especially in mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, economics
Economics
Economics is the social science that analyzes the production, distribution, and consumption of goods and services. The term economics comes from the Ancient Greek from + , hence "rules of the house"...

, engineering
Engineering
Engineering is the discipline, art, skill and profession of acquiring and applying scientific, mathematical, economic, social, and practical knowledge, in order to design and build structures, machines, devices, systems, materials and processes that safely realize improvements to the lives of...

, physics
Physics
Physics is a natural science that involves the study of matter and its motion through spacetime, along with related concepts such as energy and force. More broadly, it is the general analysis of nature, conducted in order to understand how the universe behaves.Physics is one of the oldest academic...

, statistics
Statistics
Statistics is the study of the collection, organization, analysis, and interpretation of data. It deals with all aspects of this, including the planning of data collection in terms of the design of surveys and experiments....

, and quantitative psychology
Quantitative psychology
Research in quantitative psychology develops psychological theory in relation to mathematics and statistics. Psychological research requires the elaboration of existing methods and the development of new concepts, so that quantitative psychology requires more than "applications" of statistics and...

. It has largely displaced Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

troff
Troff
troff is a document processing system developed by AT&T for the Unix operating system.-History:troff can trace its origins back to a text formatting program called RUNOFF, written by Jerome H. Saltzer for MIT's CTSS operating system in the mid-1960s...

, the other favored formatter, in many Unix installations, which use both for different purposes. It is now also being used for many other typesetting tasks, especially in the form of LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

and other template packages.

The widely used MIME type for TeX is application/x-tex. TeX is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

.

## History

When the first volume of Knuth's The Art of Computer Programming
The Art of Computer Programming
The Art of Computer Programming is a comprehensive monograph written by Donald Knuth that covers many kinds of programming algorithms and their analysis....

was published in 1969, it was typeset using hot metal type set by a Monotype Corporation
Monotype Corporation
Monotype Imaging Holdings is a Delaware corporation based in Woburn, Massachusetts and specializing in typesetting and typeface design as well as text and imaging solutions for use with consumer electronics devices. Monotype Imaging Holdings is the owner of Monotype Imaging Inc., Linotype,...

typecaster with a hot metal typesetting
Hot metal typesetting
In printing and typography, hot metal typesetting refers to 19th-century technologies for typesetting text in letterpress printing. This method injects molten type metal into a mold that has the shape of one or more glyphs...

machine from the 19th century which produced a "good classic style" appreciated by Knuth. When the second edition of the second volume was published, in 1976, the whole book had to be typeset again because the Monotype technology had been largely replaced by photographic techniques, and the original fonts were no longer available. However, when Knuth received the galley proof
Galley proof
In printing and publishing, proofs are the preliminary versions of publications meant for review by authors, editors, and proofreaders, often with extra wide margins. Galley proofs may be uncut and unbound, or in some cases electronic...

s of the new book on 30 March 1977, he found them awful. Around that time, Knuth saw for the first time the output of a high-quality digital typesetting system, and became interested in digital typography. The disappointing galley proofs gave him the final motivation to solve the problem at hand once and for all by designing his own typesetting system. On May 13, 1977, he wrote a memo to himself describing the basic features of TeX.

He planned to finish it on his sabbatical
Sabbatical year
Sabbatical or a sabbatical is a rest from work, or a hiatus, often lasting from two months to a year. The concept of sabbatical has a source in shmita, described several places in the Bible...

in 1978, but as it happened the language wasn't frozen
Freeze (software engineering)
In software engineering, a freeze is a point in time in the development process after which the rules for making changes to the source code or related resources become more strict, or the period during which those rules are applied...

until 1989, more than ten years later. Guy Steele
Guy L. Steele, Jr.
Guy Lewis Steele Jr. , also known as "The Great Quux", and GLS , is an American computer scientist who has played an important role in designing and documenting several computer programming languages.-Biography:...

happened to be at Stanford
Stanford University
The Leland Stanford Junior University, commonly referred to as Stanford University or Stanford, is a private research university on an campus located near Palo Alto, California. It is situated in the northwestern Santa Clara Valley on the San Francisco Peninsula, approximately northwest of San...

during the summer of 1978, when Knuth was developing his first version of TeX. When Steele returned to MIT
Massachusetts Institute of Technology
The Massachusetts Institute of Technology is a private research university located in Cambridge, Massachusetts. MIT has five schools and one college, containing a total of 32 academic departments, with a strong emphasis on scientific and technological education and research.Founded in 1861 in...

that autumn, he rewrote TeX's I/O to run under the ITS
Incompatible Timesharing System
ITS, the Incompatible Timesharing System , was an early, revolutionary, and influential time-sharing operating system from MIT; it was developed principally by the Artificial Intelligence Laboratory at MIT, with some help from Project MAC.In addition to being technically influential ITS, the...

operating system. The first version of TeX was written in the SAIL programming language
SAIL programming language
SAIL, the Stanford Artificial Intelligence Language, was developed by Dan Swinehart and Bob Sproull of the Stanford AI Lab in 1970. It was originally a large ALGOL 60-like language for the PDP-10 and DECSYSTEM-20....

to run on a PDP-10
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...

under Stanford's WAITS
WAITS
WAITS was a heavily-modified variant of Digital Equipment Corporation's Monitor operating system for the PDP-6 and PDP-10 mainframe computers, used at the Stanford Artificial Intelligence Laboratory up until 1990; the mainframe computer it ran on also went by the name of "SAIL".There was never an...

operating system. For later versions of TeX, Knuth invented the concept of literate programming
Literate programming
Literate programming is an approach to programming introduced by Donald Knuth as an alternative to the structured programming paradigm of the 1970s....

, a way of producing compilable source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

and cross-linked documentation typeset in TeX from the same original file. The language used is called WEB
WEB
WEB is a computer programming system created by Donald E. Knuth as the first implementation of what he called "literate programming": the idea that one could create software as works of literature, by embedding source code inside descriptive text, rather than the reverse , in an order that is...

and produces programs in DEC PDP-10 Pascal.

A new version of TeX, rewritten from scratch and called TeX82, was published in 1982. Among other changes, the original hyphenation algorithm
Hyphenation algorithm
A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen...

was replaced by a new algorithm written by Frank Liang. TeX82 also uses fixed-point arithmetic
Fixed-point arithmetic
In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point...

instead of floating-point, to ensure reproducibility of the results across different computer hardware, and includes a real, Turing-complete
Turing completeness
In computability theory, a system of data-manipulation rules is said to be Turing complete or computationally universal if and only if it can be used to simulate any single-taped Turing machine and thus in principle any computer. A classic example is the lambda calculus...

programming language, following intense lobbying by Guy Steele.

In 1989, Donald Knuth released new versions of TeX and METAFONT
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

. Despite his desire to keep the program stable, Knuth realised that 128 different characters for the text input were not enough to accommodate foreign languages; the main change in version 3.0 of TeX is thus the ability to work with 8-bits inputs, allowing 256 different characters in the text input.

Since version 3, TeX has used an idiosyncratic version numbering system, where updates have been indicated by adding an extra digit at the end of the decimal, so that the version number asymptotically
Asymptote
In analytic geometry, an asymptote of a curve is a line such that the distance between the curve and the line approaches zero as they tend to infinity. Some sources include the requirement that the curve may not cross the line infinitely often, but this is unusual for modern authors...

approaches {{pi}}
Pi
' is a mathematical constant that is the ratio of any circle's circumference to its diameter. is approximately equal to 3.14. Many formulae in mathematics, science, and engineering involve , which makes it one of the most important mathematical constants...

. This is a reflection of the fact that TeX is now very stable, and only minor updates are anticipated. The current version of TeX is 3.1415926; it was last updated in March 2008. The design was frozen after version 3.0, and no new feature or fundamental change will be added, so all newer versions will contain only bug
Software bug
A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's...

fixes. Even though Donald Knuth himself has suggested a few areas in which TeX could have been improved, he indicated that he firmly believes that having an unchanged system that will produce the same output now and in the future is more important than introducing new features. For this reason, he has stated that the "absolutely final change (to be made after my death)" will be to change the version number to {{pi}}, at which point all remaining bugs will become features.
Likewise, versions of METAFONT after 2.0 asymptotically approach {{math
E (mathematical constant)
The mathematical constant ' is the unique real number such that the value of the derivative of the function at the point is equal to 1. The function so defined is called the exponential function, and its inverse is the natural logarithm, or logarithm to base...

, and a similar change will be applied after Knuth's death.
However, since the source code of TeX is essentially in the public domain
Public domain
Works are in the public domain if the intellectual property rights have expired, if the intellectual property rights are forfeited, or if they are not covered by intellectual property rights at all...

(see below), other programmers are allowed (and explicitly encouraged) to improve the system, but are required to use another name to distribute the modified TeX, meaning that the source code can still evolve. For example, the Omega
Omega (TeX)
Omega is an extension of the TeX typesetting system that uses the Basic Multilingual Plane of Unicode. It was authored by John Plaice and Yannis Haralambous after TeX development was frozen in 1991, primarily to enhance TeX's multilingual typesetting abilities...

project was developed after 1991, primarily to enhance TeX's multilingual typesetting abilities. Donald Knuth himself created "unofficial" modified versions, such as TeX-XeT, which allows a user to mix texts written in left-to-right and right-to-left
Bi-directional text
Bi-directional text is text containing text in both text directionalities, both right-to-left and left-to-right . It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.Some writing systems of the...

writing system
Writing system
A writing system is a symbolic system used to represent elements or statements expressible in language.-General properties:Writing systems are distinguished from other possible symbolic communication systems in that the reader must usually understand something of the associated spoken language to...

s in the same document.

## Typesetting system

Backslash
The backslash is a typographical mark used mainly in computing. It was first introduced to computers in 1960 by Bob Bemer. Sometimes called a reverse solidus or a slosh, it is the mirror image of the common slash....

and are grouped with curly braces
Bracket
Brackets are tall punctuation marks used in matched pairs within text, to set apart or interject other text. In the United States, "bracket" usually refers specifically to the "square" or "box" type.-List of types:...

. However, almost all of TeX's syntactic properties can be changed on the fly which makes TeX input hard to parse by anything but TeX itself. TeX is a macro and token-based language: many commands, including most user-defined ones, are expanded on the fly until only unexpandable tokens remain which get executed. Expansion itself is practically side-effect free. Tail recursion of macros takes no memory, and if-then-else constructs are available. This makes TeX a Turing-complete
Turing completeness
In computability theory, a system of data-manipulation rules is said to be Turing complete or computationally universal if and only if it can be used to simulate any single-taped Turing machine and thus in principle any computer. A classic example is the lambda calculus...

language even at the expansion level.

The system can be divided into four levels: in the first, characters are read from the input file and assigned a category code (sometimes called "catcode", for short). Combinations of a backslash (really: any character of category zero) followed by letters (characters of category 11) or a single other character are replaced by a control sequence token. In this sense this stage is like lexical analysis, although it does not form numbers from digits. In the next stage, expandable control sequences (such as conditionals or defined macros) are replaced by their replacement text. The input for the third stage is then a stream of characters (including ones with special meaning) and unexpandable control sequences (typically assignments and visual commands). Here characters get assembled into a paragraph. TeX's paragraph breaking algorithm works by optimizing breakpoints over the whole paragraph. The fourth stage breaks the vertical list of lines and other material into pages.

The TeX system has precise knowledge of the sizes of all characters and symbols, and using this information, it computes the optimal arrangement of letters per line and lines per page. It then produces a DVI file ("DeVice Independent") containing the final locations of all characters. This dvi file can be printed directly given an appropriate printer driver, or it can be converted to other formats. Nowadays, PDFTeX
PdfTeX
The computer program pdfTeX is an extension of Knuth's typesetting program TeX, and was originally written and developed into a publicly usable product by Hàn Thế Thành as a part of the work for his PhD thesis at the Faculty of Informatics, Masaryk University, Brno...

is often used which bypasses DVI generation altogether.

The base TeX system understands about 300 commands, called primitives. However, these low-level commands are rarely used directly by users, and most functionality is provided by format files (predumped memory images of TeX after large macro collections have been loaded). Knuth's original default format, which adds about 600 commands, is Plain TeX ([ftp://tug.ctan.org/pub/tex-archive/systems/knuth/dist/lib/plain.tex available from CTAN]). The most widely used format is LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

, originally developed by Leslie Lamport
Leslie Lamport
Leslie Lamport is an American computer scientist. A graduate of the Bronx High School of Science, he received a B.S. in mathematics from the Massachusetts Institute of Technology in 1960, and M.A. and Ph.D. degrees in mathematics from Brandeis University, respectively in 1963 and 1972...

, which incorporates document styles for books, letters, slides, etc., and adds support for referencing and automatic numbering of sections and equations. Another widely used format, AMS-TeX, is produced by the American Mathematical Society
American Mathematical Society
The American Mathematical Society is an association of professional mathematicians dedicated to the interests of mathematical research and scholarship, which it does with various publications and conferences as well as annual monetary awards and prizes to mathematicians.The society is one of the...

, and provides many more user-friendly commands, which can be altered by journals to fit with their house style. Most of the features of AMS-TeX can be used in LaTeX by using the AMS "packages". This is then referred to as AMS-LaTeX
AMS-LaTeX
AMS-LaTeX is a collection ofLaTeX document classes and packages developed for the American Mathematical Society . Its additions to LaTeX include the typesetting of multi-line and other mathematical statements, document classes, and fonts containing numerous mathematical symbols.It has largely...

. Other formats include ConTeXt
ConTeXt
ConTeXt is a general-purpose document processor. It is especially suited for structured documents, automated document production, very fine typography, and multi-lingual typesetting. It is based in part on the TeX typesetting system, and uses a document markup language for manuscript preparation...

, used primarily for desktop publishing and written mostly by Hans Hagen at Pragma.

### How TeX is run

A sample Hello world program
Hello world program
A "Hello world" program is a computer program that outputs "Hello world" on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language, or to...

in plain TeX is:

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
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

) will create an output file called myfile.dvi, representing the content of the page in a device independent format (DVI). The results can either be printed directly from a DVI viewer or converted to a more common format such as PostScript
PostScript
PostScript is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. It is best known for its use as a page description language in the electronic and desktop publishing areas. Adobe PostScript 3 is also the worldwide printing and imaging...

using the dvips
Dvips
dvips is a software program that converts the DVI format output of TeX typography into a printable or otherwise presentable form. dvips was written by Tomas Rokicki to produce printable PostScript files from DVI input, and is now commonly used for general DVI conversion.The TeX typesetting system...

program. This was because TeX natively uses bitmap fonts, which are only designed to display well at one particular size, whereas PostScript typically uses scalable Type 1 font
PostScript
PostScript is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. It is best known for its use as a page description language in the electronic and desktop publishing areas. Adobe PostScript 3 is also the worldwide printing and imaging...

s. Newer versions of dvips support output of scalable fonts with a bit of tweaking. TeX variants such as PDFTeX
PdfTeX
The computer program pdfTeX is an extension of Knuth's typesetting program TeX, and was originally written and developed into a publicly usable product by Hàn Thế Thành as a part of the work for his PhD thesis at the Faculty of Informatics, Masaryk University, Brno...

produce PDF files directly.

### Mathematical example

{{anchor|math mode|mathematics mode|mathematical mode}}TeX provides a different text syntax specifically for mathematical formulae. For example, the Quadratic equation
In mathematics, a quadratic equation is a univariate polynomial equation of the second degree. A general quadratic equation can be written in the formax^2+bx+c=0,\,...

's formula appears as:

The quadratic formula is $-b \pm \sqrt{b^2 - 4ac} \over 2a$
\bye

and the output would resemble:

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$ 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 centered on a new line) is similar but uses $$instead of a single  symbol. For example, the above with the quadratic formula in display math: The quadratic formula is$$-b \pm \sqrt{b^2 - 4ac} \over 2a
\bye

renders as

## Novel aspects

The TeX software incorporates several aspects that were not available, or were of lower quality, in other typesetting programs at the time when TeX was released. Some of the innovations are based on interesting algorithms, and have led to a number of theses for Knuth's students. While some of these discoveries have now been incorporated into other typesetting programs, others, such as the rules for mathematical spacing, are still unique.

### Mathematical spacing

Since the primary goal of the TeX language is high-quality typesetting for publishers of books, Knuth
Knuth
Knuth is a name of Nordic origin. Knuth may refer to:As a family:* Knuth , a noble family originally from Mecklenburg, which since became Danish countsAs a surname:*Donald Knuth, American computer scientist; whence:...

gave a lot of attention to the spacing rules for mathematical formulae. {{or|date=March 2011}} He took three bodies of work that he considered to be standards of excellence for mathematical typography: the books typeset by Addison-Wesley Publishing
Addison-Wesley was a book publisher in Boston, Massachusetts, best known for its textbooks and computer literature. As well as publishing books, Addison-Wesley also distributed its technical titles through the Safari Books Online e-reference service...

's house (the publisher of The Art of Computer Programming), in particular the work done by Hans Wolf (maths collaborateur) and Louis Lagrange (thermodynamics innovation, +1856); editions of the mathematical journal Acta Mathematica
Acta Mathematica
Acta Mathematica is a journal publishing original research papers in all fields of mathematics. The journal was founded by Gösta Mittag-Leffler in 1882 and is published by Institut Mittag-Leffler, a research institute for mathematics belonging to the Royal Swedish Academy of Sciences...

dating from around 1910; and a copy of Indagationes Mathematicae
Indagationes Mathematicae
Indagationes Mathematicae is a mathematics journal, published quarterly by the Royal Netherlands Academy of Arts and Sciences, department of Mathematical Sciences. First published in 1951....

, a Dutch
Netherlands
The Netherlands is a constituent country of the Kingdom of the Netherlands, located mainly in North-West Europe and with several islands in the Caribbean. Mainland Netherlands borders the North Sea to the north and west, Belgium to the south, and Germany to the east, and shares maritime borders...

mathematics journal. Knuth looked closely at these printed-papers to sort out and look for a set of rules for spacing calling it TeX. While TeX provides some basic rules and the tools needed to specify proper spacing, the exact parameters depend on the font used to typeset the formula. For example, the spacing for Knuth's Computer Modern
Computer Modern
Computer Modern is the family of typefaces used by default by the typesetting program TeX. It was created by Donald Knuth with his METAFONT program, and was most recently updated in 1992. However, the family font was superseded by CM-Super , the latest release dating 2008...

fonts has been precisely fine-tuned over the years and is now set, but when other fonts, such as AMS Euler
AMS Euler
AMS Euler is an upright cursive typeface, commissioned by the American Mathematical Society and designed and created by Hermann Zapf with the assistance of Donald Knuth. It tries to emulate a mathematician's style of handwriting mathematical entities on a blackboard, which is upright rather than...

, were used by Knuth for the first time, new spacing parameters had to be defined.

### Hyphenation and justification

In comparison with manual typesetting, the problem of justification
Justification (typesetting)
In typesetting, justification is the typographic alignment setting of text or images within a column or "measure" to align along both the left and right margin...

is easy to solve with a digital system such as TeX, which, provided that good points for line breaking have been defined, can automatically spread the spaces between words to fill in the line. The problem is thus to find the set of breakpoints that will give the most pleasing result. Many line breaking algorithms use a first-fit approach, where the breakpoints for each line are determined one after the other, and no breakpoint is changed after it has been chosen. Such a system is not able to define a breakpoint depending on the effect that it will have on the following lines. In comparison, the total-fit line breaking algorithm used by TeX and developed by Donald Knuth and Michael Plass considers all the possible breakpoints in a paragraph, and finds the combination of line breaks that will produce the most globally pleasing arrangement.

Formally, the algorithm defines a value called badness associated with each possible line break; the badness is increased if the spaces on the line must stretch or shrink too much to make the line the correct width. Penalties are added if a breakpoint is particularly undesirable: for example, if a word must be hyphenated, if two lines in a row are hyphenated, or if a very loose line is immediately followed by a very tight line. The algorithm will then find the breakpoints that will minimize the sum of squares of the badness (including penalties) of the resulting lines. If the paragraph contains possible breakpoints, the number of situations that must be evaluated naively is . However, by using the method of dynamic programming
Dynamic programming
In mathematics and computer science, dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems. It is applicable to problems exhibiting the properties of overlapping subproblems which are only slightly smaller and optimal substructure...

, the complexity of the algorithm can be brought down to (see Big O notation
Big O notation
In mathematics, big O notation is used to describe the limiting behavior of a function when the argument tends towards a particular value or infinity, usually in terms of simpler functions. It is a member of a larger family of notations that is called Landau notation, Bachmann-Landau notation, or...

). Further simplifications (for example, not testing extremely unlikely breakpoints such as a hyphenation in the first word of a paragraph) lead to an efficient algorithm whose running time is almost always of order . A similar algorithm is used to determine the best way to break paragraphs across two pages, in order to avoid widows or orphans
Orphan (typesetting)
In typesetting, widows and orphans are words or short lines at the beginning or end of a paragraph, which are left dangling at the top or bottom of a column, separated from the rest of the paragraph...

(lines that appear alone on a page while the rest of the paragraph is on the following or preceding page). However, in general, a thesis by Michael Plass shows how the page breaking problem can be NP-complete
NP-complete
In computational complexity theory, the complexity class NP-complete is a class of decision problems. A decision problem L is NP-complete if it is in the set of NP problems so that any given solution to the decision problem can be verified in polynomial time, and also in the set of NP-hard...

because of the added complication of placing figures.

TeX's line breaking algorithm has been adopted by several other programs, such as Adobe InDesign
Adobe InDesign is a software application produced by Adobe Systems. It can be used to create works such as posters, flyers, brochures, magazines, newspapers and books. In conjunction with Adobe Digital Publishing Suite InDesign can publish content suitable for tablet devices...

(a desktop publishing
Desktop publishing
Desktop publishing is the creation of documents using page layout software on a personal computer.The term has been used for publishing at all levels, from small-circulation documents such as local newsletters to books, magazines and newspapers...

application) and the GNU
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

fmt Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

command line utility.

If no suitable line break can be found for a line, the system will try to hyphen
Hyphen
The hyphen is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. The hyphen should not be confused with dashes , which are longer and have different uses, or with the minus sign which is also longer...

ate a word. The original version of TeX used a hyphenation algorithm
Hyphenation algorithm
A hyphenation algorithm is a set of rules that decides at which points a word can be broken over two lines with a hyphen...

based on a set of rules for the removal of prefixes and suffixes of words, and for deciding if it should insert a break between the two consonants in a pattern of the form vowel
Vowel
In phonetics, a vowel is a sound in spoken language, such as English ah! or oh! , pronounced with an open vocal tract so that there is no build-up of air pressure at any point above the glottis. This contrasts with consonants, such as English sh! , where there is a constriction or closure at some...

consonant
Consonant
In articulatory phonetics, a consonant is a speech sound that is articulated with complete or partial closure of the vocal tract. Examples are , pronounced with the lips; , pronounced with the front of the tongue; , pronounced with the back of the tongue; , pronounced in the throat; and ,...

consonant
Consonant
In articulatory phonetics, a consonant is a speech sound that is articulated with complete or partial closure of the vocal tract. Examples are , pronounced with the lips; , pronounced with the front of the tongue; , pronounced with the back of the tongue; , pronounced in the throat; and ,...

vowel
Vowel
In phonetics, a vowel is a sound in spoken language, such as English ah! or oh! , pronounced with an open vocal tract so that there is no build-up of air pressure at any point above the glottis. This contrasts with consonants, such as English sh! , where there is a constriction or closure at some...

(which is possible most of the time). TeX82 introduced a new hyphenation algorithm, designed by Frank Liang in 1983, to assign priorities to breakpoints in letter groups. A list of hyphenation patterns is first generated automatically from a corpus of hyphenated words (a list of 50,000 words). If TeX must find the acceptable hyphenation positions in the word encyclopedia, for example, it will consider all the subwords of the extended word .encyclopedia., where . is a special marker to indicate the beginning or end of the word. The list of subwords include all the subwords of length 1 (., e, n, c, y, etc.), of length 2 (.e, en, nc, etc.), etc., up to the subword of length 14, which is the word itself, including the markers. TeX will then look into its list of hyphenation patterns, and find subwords for which it has calculated the desirability of hyphenation at each position. In the case of our word, 11 such patterns can be matched, namely 1c4l4, 1cy, 1d4i3a, 4edi, e3dia, 2i1a, ope5d, 2p2ed, 3pedi, pedia4, y1c. For each position in the word, TeX will calculate the maximum value obtained among all matching patterns, yielding en1cy1c4l4o3p4e5d4i3a4. Finally, the acceptable positions are those indicated by an odd
Even and odd numbers
In mathematics, the parity of an object states whether it is even or odd.This concept begins with integers. An even number is an integer that is "evenly divisible" by 2, i.e., divisible by 2 without remainder; an odd number is an integer that is not evenly divisible by 2...

number, yielding the acceptable hyphenations en-cy-clo-pe-di-a. This system based on subwords allows the definition of very general patterns (such as 2i1a), with low indicative numbers (either odd or even), which can then be superseded by more specific patterns (such as 1d4i3a) if necessary. These patterns find about 90% of the hyphens in the original dictionary; more importantly, they do not insert any spurious hyphen. In addition, a list of exceptions (words for which the patterns do not predict the correct hyphenation) are included with the Plain TeX format; additional ones can be specified by the user.

### Metafont

{{Main|Metafont}}
Metafont, not strictly part of TeX, is a font description system which allows the designer to describe characters algorithmically. It uses Bézier curve
Bézier curve
A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case....

s in a fairly standard way to generate the actual characters to be displayed, but Knuth devotes lots of attention to the rasterizing
Font rasterization
Font rasterization is the process of converting text from a vector description to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and easier to read...

problem on bitmap
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

ped displays. Another thesis, by John Hobby, further explores this problem of digitizing "brush trajectories". This term derives from the fact that Metafont describes characters as having been drawn by abstract brushes (and erasers).

It is possible to use TeX and LaTeX without Metafont. Adobe PostScript ("Type 1") fonts
PostScript fonts
PostScript fonts are outline font specifications developed by Adobe Systems for professional digital typesetting, which uses PostScript file format to encode font information.-History:...

may be used instead. Because (La)TeX expects fonts to be supplied as bitmaps at specific point sizes, and PostScript is a vector (outline) description scalable over a wide range, the mix of TeX and PostScript does introduce some minor complications. Nonetheless, with the help of some prewritten packages, (La)TeX can be made to use PostScript fonts. Further note that "Type 1" or "T1" can refer in documentation to two very different things: the TeX T1 character encoding scheme to map byte values to glyphs; and also to Adobe PostScript fonts.

### Macro language

TeX provides an unusual macro language; the definition of a macro not only includes a list of commands but also the syntax of the call. Macros are completely integrated with a full-scale interpreted compile-time language that also guides processing.

TeX's macro level of operation is lexical, but it is a built-in facility of TeX, that makes use of syntax interpretation. Comparing with most widely used lexical preprocessors like M4
M4 (computer language)
m4 is a general purpose macro processor designed by Brian Kernighan and Dennis Ritchie. m4 is an extension of an earlier macro processor m3, written by Ritchie for the AP-3 minicomputer.-Use:...

, it differs slightly, as the body of a macro gets tokenized at definition time, that is, it is not completely raw text. Except for a few very special cases, this gives the same behaviour.

The TeX macro language has been successfully used to extend TeX to, for instance, LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

and ConTeXt
ConTeXt
ConTeXt is a general-purpose document processor. It is especially suited for structured documents, automated document production, very fine typography, and multi-lingual typesetting. It is based in part on the TeX typesetting system, and uses a document markup language for manuscript preparation...

.

## Development

The original source code for the current TeX software is written in WEB
WEB
WEB is a computer programming system created by Donald E. Knuth as the first implementation of what he called "literate programming": the idea that one could create software as works of literature, by embedding source code inside descriptive text, rather than the reverse , in an order that is...

, a mixture of documentation written in TeX and a Pascal subset in order to ensure portability. For example, TeX does all of its dynamic allocation itself from fixed-size arrays and uses only fixed-point arithmetic
Fixed-point arithmetic
In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point...

for its internal calculations. As a result, TeX has been ported to almost all operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s, usually by using the web2c program to convert the source code into C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

instead of directly compiling the Pascal code.

Knuth has kept a very detailed log of all the bugs he has corrected and changes he has made in the program since 1982; {{As of|2008|lc=on}}, the list contains 427 entries, not including the version modification that should be done after his death as the final change in TeX. Donald Knuth offers monetary awards
Knuth reward check
Knuth reward checks are awarded by computer scientist Donald Knuth for finding mistakes in, or making suggestions for, his publications. In the preface of each of his books and on his website, Knuth offers a reward of $2.56 to the first person to find each error in his published books, whether it... to people who find and report a bug in TeX. The award per bug started at$2.56 (one "hexadecimal dollar") and doubled every year until it was frozen at its current value of \$327.68. Knuth, however, has lost relatively little money as there have been very few bugs claimed. In addition, recipients have been known to frame their check as proof that they found a bug in TeX rather than cashing it.
Due to scammers finding scanned copies of his checks on the internet and using them to try to drain his bank account, Knuth no longer sends out real checks, but those who submit bug reports can get credit at The Bank of San Serriffe instead.

### Packages

TeX is usually provided in the form of an easy-to-install bundle of TeX itself along with METAFONT
METAFONT
Metafont is a programming language used to define vector fonts. It is also the name of the interpreter that executes Metafont code, generating the bitmap fonts that can be embedded into e.g. PostScript...

and all the necessary fonts, documents formats, and utilities needed to use the typesetting system. On UNIX
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

-compatible systems, including Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, TeX is distributed in the form of the teTeX
TeTeX
teTeX is a TeX distribution for Unix-like systems. As of May 2006 teTeX is no longer actively maintained and its former maintainer Thomas Esser recommended TeX Live as the replacement....

distribution and more recently the TeX Live
TeX Live
TeX Live is a TeX distribution which is the replacement of its no-longer supported counterpart teTeX.It is now the default TeX distribution for several Linux distributions such as Fedora, Debian, Ubuntuand Gentoo....

distribution. On Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, there is the MiKTeX
MiKTeX
MiKTeX is a typesetting system for Microsoft Windows that is developed by Christian Schenk. It consists of an implementation of TeX and a set of related programs....

distribution (enhanced by proTeXt
ProTeXt
proTeXt is a freeware integrated development environment for LaTeX running on Microsoft Windows, developed by Thomas Feuerstack. Its most recent version is 3.0....

) and the Windows version of TeX Live.

Several document processing systems are based on TeX, notably jadeTeX, which uses TeX as a backend for printing from James Clark
James Clark (XML expert)
James Clark, is the author of groff and expat and has done much work with open-source software and XML. Born in London, and educated at Charterhouse and Merton College, Oxford, Clark has lived in Bangkok, Thailand since 1995, and is now a permanent resident...

's DSSSL Engine, the Arbortext publishing system, and Texinfo
Texinfo
Texinfo is a typesetting syntax used for generating documentation in both on-line and printed form with a single source file...

, the GNU
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

documentation processing system. TeX has been the official typesetting package for the GNU operating system
GNU
GNU is a Unix-like computer operating system developed by the GNU project, ultimately aiming to be a "complete Unix-compatible software system"...

since 1984.

XeTeX
XeTeX
XeTeX is a TeX typesetting engine using Unicode and supporting modern font technologies such as OpenType or Apple Advanced Typography...

is a new TeX engine that supports Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

. Originally making use of advanced Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

-specific font technologies, it now supports OpenType
OpenType
OpenType is a format for scalable computer fonts. It was built on its predecessor TrueType, retaining TrueType's basic structure and adding many intricate data structures for prescribing typographic behavior...

and is available on Linux and Microsoft Windows.

Numerous extensions and companion programs for TeX exist, among them BibTeX
BibTeX
BibTeX is reference management software for formatting lists of references. The BibTeX tool is typically used together with the LaTeX document preparation system...

for bibliographies (distributed with LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

), pdfTeX
PdfTeX
The computer program pdfTeX is an extension of Knuth's typesetting program TeX, and was originally written and developed into a publicly usable product by Hàn Thế Thành as a part of the work for his PhD thesis at the Faculty of Informatics, Masaryk University, Brno...

, which bypasses dvi and produces output in Adobe Systems
Adobe Systems Incorporated is an American computer software company founded in 1982 and headquartered in San Jose, California, United States...

' Portable Document Format
Portable Document Format
Portable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....

, and Omega
Omega (TeX)
Omega is an extension of the TeX typesetting system that uses the Basic Multilingual Plane of Unicode. It was authored by John Plaice and Yannis Haralambous after TeX development was frozen in 1991, primarily to enhance TeX's multilingual typesetting abilities...

, which allows TeX to use the Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

CTAN
CTAN is an acronym for the Comprehensive TeX Archive Network.It is the authoritative place where TeX related material and software can be found for download...

, the Comprehensive TeX Archive Network.

### Editors

There are a variety of editors designed to work with TeX.

The TeXmacs
GNU TeXmacs
GNU TeXmacs is a free scientific word processor and typesetting component of the GNU Project. It was inspired by TeX and GNU Emacs, though it shares no code with those programs. TeXmacs does use TeX fonts. It is written and maintained by Joris van der Hoeven. The program produces structured...

text editor is a WYSIWYG
WYSIWYG
WYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product...

scientific text editor that is inspired by both TeX and Emacs
Emacs
Emacs is a class of text editors, usually characterized by their extensibility. GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work.Development began in the mid-1970s and continues actively...

. It uses Knuth's fonts, and can generate TeX output.

LyX
LyX
LyX is a document processor following the self-coined "what you see is what you mean" paradigm , as opposed to the WYSIWYG ideas used by word processors...

is a WYSIWYM
WYSIWYM
WYSIWYM is an acronym for What You See Is What You Mean, and refers to a paradigm for document editing...

document processor which runs on a variety of platforms including Linux, Windows (newer versions require Windows 2000 or later) or Mac OS X (using a non-native Qt
Qt (toolkit)
Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface , and also used for developing non-GUI programs such as command-line tools and consoles for servers...

front-end).

TeXShop
TeXShop
TeXShop is a free TeX editor and previewer for Mac OS X. It is licensed under the GNU GPL.It was developed by the American mathematician Richard Koch. TeXShop was created especially for the Mac OS X user interface Aqua and capitalized on the native PDF support of the Macintosh operating system...

for Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, and WinShell for Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

are similar tools and provide integrated development environment (IDE) for working with LaTeX or TeX. For KDE
KDE
KDE is an international free software community producing an integrated set of cross-platform applications designed to run on Linux, FreeBSD, Microsoft Windows, Solaris and Mac OS X systems...

/Qt
QT
- Units and measurements :* Quart, a measure of volume in traditional systems of units* Quarter, a unit of mass in Imperial units, equal to 2 stones or a quarter of a long hundredweight; one quarter = 12.70058636 kg* QT interval, a measurement used in cardiology...

, Kile
Kile
Kile is a TeX/LaTeX editor to edit TeX/LaTeX source code. It runs on Unix-like systems including Mac OS X and Linux with the Qt libraries installed.- Name :...

provides such an IDE.

Texmaker
Texmaker

is the Pure Qt
QT
- Units and measurements :* Quart, a measure of volume in traditional systems of units* Quarter, a unit of mass in Imperial units, equal to 2 stones or a quarter of a long hundredweight; one quarter = 12.70058636 kg* QT interval, a measurement used in cardiology...

equivalent of Kile, with a user interface that is nearly the same as Kile's.

GNU Emacs has various built-in and third party packages with support for TeX, the major one being AUCTeX
AUCTeX
AUCTeX is an extensible package for writing and formatting...

.

For Vim
Vim (text editor)
Vim is a text editor written by Bram Moolenaar and first released publicly in 1991. Based on the vi editor common to Unix-like systems, Vim is designed for use both from a command line interface and as a standalone application in a graphical user interface...

there is the Vim-LaTeX Suite and Automatic TeX.

Donald Knuth has indicated several times that the source code of TeX has been placed into the "public domain," and he strongly encourages modifications or experimentations with this source code. However, since the code is still copyrighted, it is technically free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

/open-source software
Open-source software
Open-source software is computer software that is available in source code form: the source code and certain other rights normally reserved for copyright holders are provided under a software license that permits users to study, change, improve and at times also to distribute the software.Open...

but is not in the public domain
Public domain
Works are in the public domain if the intellectual property rights have expired, if the intellectual property rights are forfeited, or if they are not covered by intellectual property rights at all...

in the legal sense.{{citation needed|date=April 2011}} In particular, since Knuth highly values the reproducibility of the output of all versions of TeX, any changed version must not be called {{TeX}}, TeX, or anything confusingly similar. To enforce this rule, any implementation of the system must pass a test suite called the TRIP test before being allowed to be called TeX. The question of license is somewhat confused by the statements included at the beginning of the TeX source code, which indicate that "all rights are reserved. Copying of this file is authorized only if (...) you make absolutely no changes to your copy". However, this restriction should be interpreted as a prohibition to change the source code as long as the file is called tex.web. This interpretation is confirmed later in the source code when the TRIP test is mentioned ("If this program is changed, the resulting system should not be called '{{TeX}}'").

The American Mathematical Society
American Mathematical Society
The American Mathematical Society is an association of professional mathematicians dedicated to the interests of mathematical research and scholarship, which it does with various publications and conferences as well as annual monetary awards and prizes to mathematicians.The society is one of the...

has once tried to claim a trademark
A trademark, trade mark, or trade-mark is a distinctive sign or indicator used by an individual, business organization, or other legal entity to identify that the products or services to consumers with which the trademark appears originate from a unique source, and to distinguish its products or...

for TeX. This was rejected because at the time – the early 1980s – "TEX" (all caps) was registered by Honeywell
Honeywell
Honeywell International, Inc. is a major conglomerate company that produces a variety of consumer products, engineering services, and aerospace systems for a wide variety of customers, from private consumers to major corporations and governments....

for the "Text EXecutive" text processing system.{{Citation needed|date=April 2010}}

## Use of TeX

In several technical fields, in particular, computer science, mathematics, engineering, and physics, TeX has become a de facto standard
De facto standard
A de facto standard is a custom, convention, product, or system that has achieved a dominant position by public acceptance or market forces...

Addison-Wesley was a book publisher in Boston, Massachusetts, best known for its textbooks and computer literature. As well as publishing books, Addison-Wesley also distributed its technical titles through the Safari Books Online e-reference service...

, Cambridge University Press
Cambridge University Press
Cambridge University Press is the publishing business of the University of Cambridge. Granted letters patent by Henry VIII in 1534, it is the world's oldest publishing house, and the second largest university press in the world...

, Elsevier
Elsevier
Elsevier is a publishing company which publishes medical and scientific literature. It is a part of the Reed Elsevier group. Based in Amsterdam, the company has operations in the United Kingdom, USA and elsewhere....

, Oxford University Press
Oxford University Press
Oxford University Press is the largest university press in the world. It is a department of the University of Oxford and is governed by a group of 15 academics appointed by the Vice-Chancellor known as the Delegates of the Press. They are headed by the Secretary to the Delegates, who serves as...

and Springer
- Selected publications :* Encyclopaedia of Mathematics* Ergebnisse der Mathematik und ihrer Grenzgebiete * Graduate Texts in Mathematics * Grothendieck's Séminaire de géométrie algébrique...

. Numerous journals in these fields are produced using TeX or LaTeX, allowing authors to submit their raw manuscript written in TeX.

While many publications in other fields, including dictionaries and legal publications, have been produced using TeX, it has not been as successful as in more technical fields, because TeX was primarily designed for mathematics. When he designed TeX, Donald Knuth did not believe that a single typesetting system would fit everyone's needs; instead, he designed many hooks inside the program so that it would be possible to write extensions, and released the source code, hoping that publishers would design versions tailored to their needs. While such extensions have been created (including some by Knuth himself), most people have extended TeX only using macros and it has remained a system associated with technical typesetting.

For a short time it has now been possible to use TeX for automatic generation of sophisticated layout for XML data.
The differences in syntax between the two description languages can be overcome with the help of TeXML
TeXML
TeXML [tɛχːml] is – as a process – a TeX based alternative to XSL-FO.TeXML has been developed as an OpenSource project with the aim to automatically present XML data as PDF with sophisticated layoutproperties....

.
In the context of XML publication, TeX can thus be considered an alternative to XSL-FO.

## Pronouncing and writing "TeX"

The name TeX is intended by its developer to be ˈ, with the final consonant of loch or Bach. The letters of the name are meant to represent the capital Greek
Greek alphabet
The Greek alphabet is the script that has been used to write the Greek language since at least 730 BC . The alphabet in its classical and modern form consists of 24 letters ordered in sequence from alpha to omega...

letters tau
Tau
Tau is the 19th letter of the Greek alphabet. In the system of Greek numerals it has a value of 300.The name in English is pronounced , but in modern Greek it is...

, epsilon
Epsilon
Epsilon is the fifth letter of the Greek alphabet, corresponding phonetically to a close-mid front unrounded vowel . In the system of Greek numerals it has a value of 5. It was derived from the Phoenician letter He...

, and chi
Chi (letter)
Chi is the 22nd letter of the Greek alphabet, pronounced as in English.-Greek:-Ancient Greek:Its value in Ancient Greek was an aspirated velar stop .-Koine Greek:...

, as TeX is an abbreviation of τέχνη
Techne
Techne, or techné, as distinguished from episteme, is etymologically derived from the Greek word τέχνη which is often translated as craftsmanship, craft, or art. It is the rational method involved in producing an object or accomplishing a goal or objective...

(ΤΕΧΝΗ – technē), Greek for both "art" and "craft", which is also the root word of technical. English speakers often pronounce it /ˈtɛk/, like the first syllable of technical.

Donald Knuth instructs that it be typeset with the "E" below the baseline and reduced spacing between the letters. This is done, as Knuth mentions in his TeXbook, to distinguish TeX from other system names such as TEX, the Text EXecutive processor (developed by Honeywell Information Systems). Fans like to proliferate names from the word "TeX"—such as TeXnician (user of TeX software), TeXhacker (TeX programmer), TeXmaster (competent TeX programmer), TeXhax, and TeXnique.

## Community

Notable entities in the TeX community include the TeX Users Group, which publishes TUGboat
TUGboat
TUGboat is a journal published three times per year by the TeX Users Group. It covers a wide range of topics in digital typography relevant to the TeX typesetting system. The editor is Barbara Beeton.-External links:**...

and The PracTeX Journal
The PracTeX Journal
The PracTeX Journal, or simply PracTeX, also known as TPJ, is an online journal focussing on practical use of the TeX typesetting system...

, covering a wide range of topics in digital typography
Digital typography
Digital typography is the arrangement of type using computers.- See also :* Typography* Computer font* Web typography* Desktop publishing* Font rasterization...

relevant to TeX. The Deutschsprachige Anwendervereinigung TeX
Deutschsprachige Anwendervereinigung TeX
Deutschsprachige Anwendervereinigung TeX e. V., or DANTE e. V., is the German-language TeX users group. With over 2000 members, it is today the largest TeX users group worldwide....

is a large user group in Germany. The TeX Users Group was founded in 1980 for educational and scientific purposes, provides an organization for those who have an interest in typography and font design, and are users of the TeX typesetting system invented by Donald Knuth
Donald Knuth
Donald Ervin Knuth is a computer scientist and Professor Emeritus at Stanford University.He is the author of the seminal multi-volume work The Art of Computer Programming. Knuth has been called the "father" of the analysis of algorithms...

. The TeX Users Group represents the interests of TeX users worldwide. The TeX Users Group publishes the journal
Scientific journal
In academic publishing, a scientific journal is a periodical publication intended to further the progress of science, usually by reporting new research. There are thousands of scientific journals in publication, and many more have been published at various points in the past...

TUGboat
TUGboat
TUGboat is a journal published three times per year by the TeX Users Group. It covers a wide range of topics in digital typography relevant to the TeX typesetting system. The editor is Barbara Beeton.-External links:**...

three times per year

{{Portal|Free software}}
• List of document markup languages
• Comparison of document markup languages
Comparison of document markup languages
The following tables compare general and technical information for a number of document markup languages. Please see the individual markup languages' articles for further information.-General information:...

• Formula editor
Formula editor
A formula editor is a name for a computer program that is used to typeset mathematical works or formulae.Formula editors typically serve two purposes:...

• PSTricks
PSTricks
PSTricks is a set of macros that allow the inclusion of PostScript drawings directly inside TeX or LaTeX code.It is originally the work of Professor Timothy Van Zandt and in recent years it has been maintained by Denis Girou, Sebastian Rahtz and Herbert Voss....

• PGF/TikZ
PGF/TikZ
PGF/TikZ is a tandem of languages for producing vector graphics from a geometric/algebraic description. PGF is a lower-level language, while TikZ is a set of higher-level macros that use PGF. The top-level PGF and TikZ commands are invoked as TeX macros, but in contrast with PSTricks, the PGF/TikZ...

• New Typesetting System
New Typesetting System
The New Typesetting System is a reimplementation of the typesetting system TeX in Java. The specific aims of the project were to continue the tradition of Donald Knuth's TeX by providing a first-class typesetting software which is both portable and available free of charge...

– a TeX reimplementation (discontinued)
• MathTime
MathTime
MathTime is a commercial set of Times compatible mathematical type family for TeX, created by Michael Spivak. Used together with Times, it is one of the few typefaces that provide full-featured text and mathematical typesetting within TeX.MathTime has been available in three variants:* MathTime...