Eqn
Encyclopedia
Part of the 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...

 suite of 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...

 document layout tools, eqn is a preprocessor
Preprocessor
In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers...

 that formats equations for printing. A similar program, neqn, accepted the same input as eqn, but produced output tuned to look better in nroff
Nroff
nroff is a Unix text-formatting program; it produces output suitable for simple fixed-width printers and terminal windows...

. The eqn program was created in 1974 by Brian Kernighan
Brian Kernighan
Brian Wilson Kernighan is a Canadian computer scientist who worked at Bell Labs alongside Unix creators Ken Thompson and Dennis Ritchie and contributed to the development of Unix. He is also coauthor of the AWK and AMPL programming languages. The 'K' of K&R C and the 'K' in AWK both stand for...

 and Lorinda Cherry
Lorinda Cherry
Lorinda Cherry is a computer programmer. She joined Unix in 1972 as an assembly language programmer. She received her Masters in computer science from Stevens Institute of Technology in 1969....

.

The input language used by eqn allows the user to write mathematical expressions in much the same way as they would be spoken aloud. The eqn language is similar to the mathematical component of TeX
TeX
TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

, which appeared several years later, but is simpler and less complete.

An independent compatible implementation of the eqn preprocessor has been developed by 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"...

 as part of groff
Groff
Groff is an anglicized form of the surname Graf or Graff and of predominantly Swiss and sometimes German origin.Groff may also refer to:People:*Groff family, one of the early 17th century founding families of North America...

, the GNU version of troff. mandoc
Mandoc
mandoc is an ISC licensed utility for formatting man pages, specifically those written in the mdoc macro language...

, a specialised compiler for UNIX man pages, also contains a standalone eqn parser/formatter.

Syntax examples

Here is how some examples would be written in eqn (with equivalents in TeX for comparison):
TeX eqn formula
$a^2$ a sup 2
$\sum_{k=1}^N k^2$ sum from { k = 1 } to N { k sup 2 }

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK