LinuxCommandLibrary

roff2dvi

Convert roff documents to DVI format

SYNOPSIS

roff2dvi [options] [file...]

PARAMETERS

-h
    Display a help message and exit.

-v
    Display version information and exit.

-e
    Pass the `-e` option to `troff`. This enables environment processing.

-m
    Specify the roff macro package to use (e.g., `man`, `mdoc`). Equivalent to `-m` passed to `troff`.

file...
    One or more roff input files. If no files are specified, reads from standard input.

DESCRIPTION

The `roff2dvi` command is a utility in Unix-like operating systems designed to translate documents formatted using the roff/troff typesetting system into the Device Independent (DVI) file format. DVI files are a common intermediary format that can then be further processed into other formats such as PostScript (PS) or PDF for printing or viewing on various devices.

`roff2dvi` is essentially a wrapper script that typically pipes the output of a roff processor (like `troff` or `nroff`) through a DVI driver, usually `dvips`. The specific roff processor used and the options passed to it are often configurable through environment variables or command-line arguments. The primary purpose of `roff2dvi` is to simplify the process of generating DVI files from roff documents by handling the necessary piping and option setting automatically. It provides a convenient way to quickly convert roff source files into a DVI representation, which can then be converted to other formats using other tools. This command is particularly useful in environments where roff/troff is used for document preparation and DVI output is desired for printing or further processing.

CAVEATS

The availability and specific behavior of `roff2dvi` can vary depending on the Linux distribution and the installed roff/troff implementation. It is often a shell script that relies on other tools like `troff` and `dvips`. Ensure these dependencies are installed to use it effectively.

ENVIRONMENT VARIABLES

Several environment variables can influence the behavior of `roff2dvi`. Common ones include:
ROFF: Specifies the roff processor to use (e.g., `troff`, `nroff`).
TROFF: Specifies the troff processor to use.
DVIPS: Specifies the dvips program to use.
ROFF2DVI_OPTIONS: Additional options to pass to the roff processor.

SEE ALSO

troff(1), nroff(1), dvips(1), man(1)

Copied to clipboard