MTex Home Page

Copyright © 1997, Digital Equipment Corporation. All rights reserved.


What is mtex?

Mtex is a system for producing man pages in both HTML and nroff formats from a single source format. The mtex file format is loosely based on LaTeX, but it contains far fewer commands and is somewhat fragile.

Downloading and Installation

Mtex is a collection of LIM scripts. Before you install mtex, you will first have to download and install the LIM processor. For more information about downloading an installing LIM, see the LIM Home Page.

To download mtex, follow these steps:

Once you have downloaded and unpacked the mtex sources, follow these steps from your "mtex" directory to build mtex on your system:

Reporting Bugs

Mtex was written by Allan Heydon. If you have problems installing mtex or if you notice a bug, please send e-mail to describing the problem. Please include the mtex source file that triggers the bug if possible.

Man Pages

For more detailed information about mtex, see the following man pages.

Describes the mtex file format.

Converts mtex documents to HTML (HyperText Markup Language} format for viewing over the web.

Converts mtex documents to man format for viewing with nroff(1)/troff(1) in conjunction with the man(7) macros.

Converts mtex documents to LaTeX format for processing by latex(1).

Command Summary

Like LaTeX, mtex commands are introduced by the \ (backslash) character, and command arguments are delimited by curly braces { }. Some commands have multiple arguments, in which case each argument follows the command surrounded by curly braces. Mtex also uses \begin and \end commands to bracket environments. Unlike LaTeX, curly braces are used only to delimit command arguments, and not to delimit scopes. Also, there are no declarations, only commands; so you write \it{...} instead of {\it ...} to produce italics text.

Here is a summary of the mtex commands:

Declare the start of the manpage with the specified title for the command or routine named <name> in section <num> of the manual.

Introduce a new section of the man page.

\bf{<text>}, \it{<text>}, \tt{<text>}
Typeset <text> in a bold face, italics, or typewriter font, respectively.

Make <text> an anchor named <name> in the current document.

Make <text> a hypertext link to the named HTML <URL>.

\begin{<env>} ... \end{<env>}
Delimit a new environment.

Start a new line in the flushleft environment.

\item, \item{<description>}
Start new items in the itemize, enumerate, and description environments.

Environment Summary

Here is a summary of the mtex environments:

An environment for displaying left-justified lines of text. New lines are started with the \newline command.

Displays unfilled text in a fixed-width font without interpretting any of the usual mtex commands and escape sequences.

itemize, enumerate, description
The list environments. Items in the itemize environment are delimited by tick marks; those in the enumerate environment are delimited by increasing integers starting at one; and those in the description environment are delimited by pieces of text.

html, roff, tex
The output-specific environments for processing commands for a particular output format.


As a starting point, the mtex2html.1.mtex source file provides a good example of a simple man page. The mtex.7.mtex source is a much more complicated man page; it is longer and it contains many examples of the language's character quotation facilities.

Usage at SRC

At the Systems Research Center, mtex has been used in the man pages of the following projects, among others.

[ Systems Research Center (SRC) Software Home Page ]

Last modified on Wed Oct  1 11:48:13 PDT 1997 by heydon

Legal Statement Privacy Statement