LaTeX (/ˈleɪtɛk/ LAY-tek or /ˈlɑːtɛk/ LAH-tek) is a document preparation system and document markup language. LaTeX uses the TeX typesetting program for formatting its output, and is itself written in the TeX macro language. LaTeX is not the name of a particular editing program, but refers to the encoding or tagging conventions that are used in LaTeX documents. Almost any editing program or word-processor may be used to write LaTeX documents, although there are many editing programs written specially to make using LaTeX easy. Interactive websites and smartphone apps are increasingly (2013) generalizing and simplifying the tasks of writing documents with LaTeX.
One of the hallmarks of LaTeX as a piece of software and a document preparation system is its maturity. It has been used intensively as a writing environment of first choice by a large and diverse community of writers for many decades. As such, it has evolved into an extremely effective and powerful writing tool.
LaTeX is intended to provide a high-level language that accesses the power of TeX. LaTeX essentially comprises a collection of TeX macros and a program to process LaTeX documents. Because the TeX formatting commands are very elementary, it is usually much easier for authors to use LaTeX, where commands for common requirements such as chapter headings, footnotes, cross-references and bibliographies are ready-made.
LaTeX was originally written in the early 1980s by Leslie Lamport at SRI International. The current version is LaTeX2e. LaTeX is free software and is distributed under the LaTeX Project Public License (LPPL).
TeX (/ˈtɛx/ tekh as in Greek, but often pronounced /ˈtɛk/ tek in English) is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as TeX.
Together with the Metafont language for font description and the Computer Modern family of typefaces, TeX was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonably minimal 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 a 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, especially in mathematics, computer science, economics, engineering, physics, statistics, and quantitative psychology. It has largely displaced Unix troff, the other favored formatter, in many Unix installations, which use both for different purposes. It is also used for many other typesetting tasks, especially in the form of LaTeX, ConTeXt and other template packages.The widely used MIME type for TeX is application/x-tex. TeX is free software.
When the first volume of Donald Knuth’s The Art of Computer Programming was published in 1969, it was typeset using hot metal type set by a Monotype Corporation typecaster with a hot metal typesetting 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. When Knuth received the galley proofs 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 13 May 1977, he wrote a memo to himself describing the basic features of TeX.
He planned to finish it on his sabbatical in 1978, but as it happened the language was not frozen until 1989, more than ten years later. Guy Steele happened to be at Stanford during the summer of 1978, when Knuth was developing his first version of TeX. When Steele returned to MIT that autumn, he rewrote TeX’s I/O to run under the ITS operating system. The first version of TeX was written in the SAIL programming language to run on a PDP-10 under Stanford’s WAITS operating system. For later versions of TeX, Knuth invented the concept of literate programming, a way of producing compilable source code and cross-linked documentation typeset in TeX from the same original file. The language used is called WEB 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 was replaced by a new algorithm written by Frank Liang. TeX82 also uses fixed-point arithmetic instead of floating-point, to ensure reproducibility of the results across different computer hardware, and includes a real, Turing-complete programming language, following intense lobbying by Guy Steele.
In 1989, Donald Knuth released new versions of TeX and METAFONT. 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-bit 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 approaches π. 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 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 e, and a similar change will be applied after Knuth’s death.
Since the source code of TeX is essentially in the public domain (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 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 writing systems in the same document.