Skip to Content
UNIX° TEXT PROCESSING
book

UNIX° TEXT PROCESSING

by Dale Dougherty, Tim O'Reilly
May 1987
Intermediate to advanced
680 pages
17h 3m
English
O'Reilly Media, Inc.
Content preview from UNIX° TEXT PROCESSING

images

Typesetting Equations with eqn

Typesetting mathematical equations has always been a problem for users who have a limited knowledge of mathematics or typesetting. This is because mathematical expressions are often a mixture of standard text and special characters in different point sizes. For example, the equation:

Image

requires three special charactrs (Σ, ∞, and →)and roman and italic characters in two different sizes. Expressions also may require horizontal and vertical printing motions (as in subscripts and superscripts).

You could code this example using troff requests, but the syntax for describing the printing motions, sizes, and fonts are difficult to learn and difficult to type in correctly. UNIX has formatting tools specifically designed for documents containing mathematical symbols—the programs eqn and neqn. The eqn program is a preprocessor for troff; neqn is a preprocessor for nroff.

With eqn you can typeset both inline equations and equations that are set off from the body of the text like the example shown. It takes an English-like description of a mathematical equation and generates a troff script. You don’t need to understand what you are typing.

The eqn preprocessor was designed to be easy to learn and even easier to use. This implies that normal mathematical conventions ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
Journey from Natural Numbers to Complex Numbers

Journey from Natural Numbers to Complex Numbers

Nita H. Shah, Vishnuprasad D. Thakkar

Publisher Resources

ISBN: 9780810462915