LinuxCommandLibrary

roff2dvi

Convert roff documents to DVI format

SYNOPSIS

roff2dvi [OPTION...] [FILE...]
This command processes one or more FILEs (or standard input if no files are specified) and outputs the resulting DVI to standard output.

PARAMETERS

-f
    Run fast. Do not output a preamble, which can sometimes speed up processing for simple documents.

-F <dir>
    Prepend <dir> to the search path for font, device, and other groff related files. This is useful for custom installations or document-specific resources.

-v
    Print the version number of roff2dvi to standard error and then exit.

-z
    Suppress output from troff if there are any errors during processing. Only error messages will be shown.

DESCRIPTION

roff2dvi is a utility that converts documents formatted with roff or troff (specifically, groff) into the Device Independent (DVI) file format. DVI is a binary format produced by TeX and groff (when using the dvi device), designed to be easily converted into various output formats (like PostScript, PDF) or viewed directly. roff2dvi acts as a convenient wrapper script, essentially invoking the groff command with the appropriate options to generate DVI output. It's commonly used in UNIX-like systems for processing man pages and other text-based documents that use the roff typesetting system, making them viewable or printable via DVI tools.

CAVEATS

roff2dvi is primarily a convenience script that wraps the groff command. Most command-line options are passed directly to groff. Therefore, for advanced usage or specific typesetting controls, one typically refers to the groff(1) manual page. The generated DVI files require a DVI viewer (e.g., xdvi) or a DVI-to-PostScript/PDF converter (e.g., dvips, dvipdfm) to be rendered or printed.

BACKEND OPERATION

roff2dvi essentially executes a command similar to groff -Tdvi [options] [files]. This means that many options available for groff can be passed to roff2dvi and will be handled by the underlying groff command.

OUTPUT REDIRECTION

By default, roff2dvi writes the DVI output to standard output. To save it to a file, you typically redirect the output using shell redirection, e.g., roff2dvi document.roff > document.dvi.

HISTORY

roff2dvi is an integral part of the groff (GNU roff) project, which aims to provide a free software implementation of the roff typesetting system. Its development has mirrored that of groff itself, evolving as groff gained more features and device support. It emerged as a user-friendly wrapper to simplify the common task of converting roff source to DVI format, a critical step for preparing documents for printing or viewing in environments where DVI is a primary output format.

SEE ALSO

groff(1), troff(1), dvi(5)

Copied to clipboard