neqn
Format mathematical equations for troff
SYNOPSIS
neqn [-d xy] [-f font] [-p n] [-s n] [-T name] [files ...]
PARAMETERS
-d xy
Specifies equation delimiters to be x and y.
-f font
Defines the default font as font.
-p n
Sets the point size to n.
-s n
Sets the size to n points.
-T name
Prepares output for device name, rather than the default troff.
files ...
One or more files to process. If no files are given, neqn reads from standard input.
DESCRIPTION
The neqn command is a preprocessor for troff that allows users to easily typeset mathematical equations. It converts equation descriptions written in a specialized language into troff input, which can then be processed by troff to produce formatted output. This allows complex mathematical notation to be displayed accurately and consistently within documents. Without neqn, creating mathematical equations with troff would be significantly more difficult and time-consuming. It handles tasks such as creating symbols, fractions, integrals, sums, matrices, and alignment. neqn is essential for producing high-quality documents containing complex mathematical expressions. It typically reads from standard input or specified files, and writes its output to standard output, suitable for piping to troff. Its power comes from its ability to interpret a concise language for defining equation structures and symbols. It provides a layer of abstraction that simplifies the creation of equations for the troff typesetting system.
CAVEATS
neqn relies on troff or a compatible typesetting system to actually render the formatted output. The equation language requires specific syntax and may have a learning curve.
It can be used to create equations for pic(1).
It may be required to be used with gtroff.
EQUATION LANGUAGE
The language used by neqn is a domain-specific language that uses keywords and operators to define mathematical expressions. It includes features like creating fractions with 'over', superscripts and subscripts with 'sup' and 'sub', square roots with 'sqrt', integrals, sums and matrices. It enables control over symbol sizes, positioning, and fonts.
HISTORY
neqn was originally developed as part of the Unix typesetting toolchain. Its purpose was to provide a more accessible way to include mathematical equations in documents formatted by troff. It simplified the process of creating complex mathematical expressions, which was previously a tedious and error-prone task using raw troff commands. Over time, it has become a standard tool for technical writing and scientific publishing on Unix-like systems, facilitating the creation of professional-looking documents with complex mathematical content. It's remained relatively stable, focusing on robust processing of the equation language.