Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Troff
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Preprocessors== As ''troff'' evolved, since there are several things which cannot be done easily in ''troff'', several [[preprocessor]]s were developed. These programs transform certain parts of a document into ''troff'' input, fitting naturally into the use of "pipelines" in Unix β sending the output of one program as the input to another (see [[pipes and filters]]). Typically, each preprocessor translates only sections of the input file that are specially marked, passing the rest of the file through unchanged. The embedded preprocessing instructions are written in a simple application-specific programming language, which provides a high degree of power and flexibility. * [[eqn (software)|eqn]] preprocessor allows mathematical formulae to be specified in simple and intuitive manner.<ref>B. W. Kernighan and Lorinda L. Cherry. ''A System for Typesetting Mathematics''. CSTR #17, Bell Labs, May 1974.</ref> * tbl is a preprocessor for formatting tables. * [[refer (software)|refer]] (and the similar program ''bib'') processes citations in a document according to a [[bibliographic]] database. Three preprocessors provide ''troff'' with drawing capabilities by defining a [[domain-specific language]] for describing the picture. * ''[[pic (software)|pic]]'' is a [[procedural programming language]] providing various drawing functions like ''circle'' and ''box''.<ref>B. W. Kernighan. ''PIC β A Graphics Language for Typesetting (Revised User Manual)''. CSTR #116, Bell Labs, December 1984.</ref> * ''ideal'' allows the drawing of pictures [[Declarative programming|declaratively]], deriving the picture by solving a system of [[simultaneous equations]] based on vectors and transformations described by its input.<ref>C. J. Van Wyk. ''IDEAL User's Manual''. CSTR #103, Bell Labs, December 1981.</ref> * ''grn'' describes the pictures through graphical elements drawn at absolute coordinates, based on the ''[[gremlin (file format)|gremlin file format]]'' defined by an early graphics workstation.<ref>grn β groff preprocessor for gremlin files [http://www.unix.com/man-page/All/1/grn/].</ref> In addition, there is a command [[soelim]] that removes <code>.so</code> inclusion directives from the input text.<ref name="oreilly-quick-svr4"/> A typical structure of the pipeline might be: <code>soelim <i>file</i> | refer | ideal | pic | tbl | eqn | troff</code> Yet more preprocessors allow the drawing of more complex pictures by generating output for ''pic''. * ''grap'' draws [[chart]]s, like [[scatter plots]] and [[histograms]].<ref>J. L. Bentley and B. W. Kernighan. ''GRAP β A Language for Typesetting Graphs (Tutorial and User Manual)''. CSTR #114, Bell Labs, August 1984.</ref> * ''chem'' draws [[structural formula|chemical structure diagrams]].<ref>J. L. Bentley, L. W. Jelinski, and B. W. Kernighan. ''CHEM β A Program for Typesetting Chemical Structure Diagrams''. CSTR #122, Computers and Chemistry, Bell Labs, April 1986.</ref> * ''dformat'' draws [[row (database)|record-based]] [[data structures]].<ref>J. L. Bentley. ''DFORMAT β A Program for Typesetting Data Formats''. CSTR #142, Bell Labs, April 1988.</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)