# eqn

## format equations for troff or MathML

eqn [-rvCNR] [-d xy] [-T name] [-M dir] [-f F] [-s n] [-p n] [-m n] [file ...]

This manual page describes the GNU version of eqn, which is part of the groff document formatting system. eqn compiles descriptions of equa‐ tions embedded within troff input files into commands that are under‐ stood by troff. Normally, it should be invoked using the -e option of groff. The syntax is quite compatible with Unix eqn. The output of GNU eqn cannot be processed with Unix troff; it must be processed with GNU troff. If no files are given on the command line, the standard in‐ put is read. A filename of - causes the standard input to be read. eqn searches for the file eqnrc in the directories given with the -M option first, then in /usr/lib/groff/site-tmac, /usr/share/groff/ site-tmac, and finally in the standard macro directory /usr/share/ groff/1.22.4/tmac. If it exists, eqn processes it before the other in‐ put files. The -R option prevents this. GNU eqn does not provide the functionality of neqn: it does not support low-resolution, typewriter-like devices (although it may work ade‐ quately for very simple input).

Whitespace is permitted between a command-line option and its argument. -dxy Specify delimiters x and y for the left and right end, respec‐ tively, of in-line equations. Any delim statements in the source file overrides this. -C Recognize .EQ and .EN even when followed by a character other than space or newline. Also, the statement ‘delim on’ is not handled specially. -N Don't allow newlines within delimiters. This option allows eqn to recover better from missing closing delimiters. -v Print the version number. -r Only one size reduction. -mn The minimum point-size is n. eqn does not reduce the size of subscripts or superscripts to a smaller size than n. -Tname The output is for device name. Normally, the only effect of this is to define a macro name with a value of 1; eqnrc uses this to provide definitions appropriate for the output device. However, if the specified device is “MathML”, the output is MathML markup rather than troff commands, and eqnrc is not loaded at all. The default output device is ps. -Mdir Search dir for eqnrc before the default directories. -R Don't load eqnrc. -fF This is equivalent to a gfont F command. -sn This is equivalent to a gsize n command. This option is depre‐ cated. eqn normally sets equations at whatever the current point size is when the equation is encountered. -pn This says that subscripts and superscripts should be n points smaller than the surrounding text. This option is deprecated. Normally eqn sets subscripts and superscripts at 70% of the size of the surrounding text.

MathML is designed on the assumption that it cannot know the exact physical characteristics of the media and devices on which it will be rendered. It does not support fine control of motions and sizes to the same degree troff does. Thus: * eqn parameters have no effect on the generated MathML. * The special, up, down, fwd, and back operations cannot be imple‐ mented, and yield a MathML ‘’ message instead. * The vcenter keyword is silently ignored, as centering on the math axis is the MathML default. * Characters that eqn over troff sets extra large – notably the integral sign – may appear too small and need to have their ‘’ wrappers adjusted by hand. As in its troff mode, eqn in MathML mode leaves the .EQ and .EN delim‐ iters in place for displayed equations, but emits no explicit delim‐ iters around inline equations. They can, however, be recognized as strings that begin with ‘$’ and end with ‘$’ and do not cross line boundaries. See section “Bugs” below for translation limits specific to eqn.