Eqn (software)

eqn
Original author(s)Brian Kernighan,
Lorinda Cherry
(AT&T Bell Laboratories)
Developer(s)Various open-source and commercial developers
Initial releaseJune 1974; 50 years ago (1974-06)
Written inC, Yacc[1]
Operating systemUnix, Unix-like, Plan 9
PlatformCross-platform
TypeCommand
LicensePlan 9: MIT License

Part of the troff suite of Unix document layout tools, eqn is a preprocessor that formats equations for printing. A similar program, neqn, accepted the same input as eqn, but produced output tuned to look better in nroff. The eqn program was created in 1974 by Brian Kernighan and Lorinda Cherry. It was implemented using yacc compiler-compiler.[1]

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 language is defined by a context-free grammar, together with operator precedence and operator associativity rules.[2] The eqn language is similar to the mathematical component of TeX, which appeared several years later, but is simpler and less complete.

An independent compatible implementation of the eqn preprocessor has been developed by GNU as part of groff, the GNU version of troff. The GNU implementation extends the original language by adding a number of new keywords such as smallover and accent. mandoc, a specialised compiler for UNIX man pages, also contains a standalone eqn parser/formatter.

  1. ^ a b Cite error: The named reference Kernighan_Brailsford was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference Kernighan_Cherry_1975 was invoked but never defined (see the help page).