Интерактивная система просмотра системных руководств (man-ов)
>> groff_out (5) ( FreeBSD man: Форматы файлов ) groff_out (5) ( Linux man: Форматы файлов )
groff_out - groff intermediate output format
This manual page describes the
format of the GNU
text processing system
This output is produced by a run of the GNU
It contains already all device-specific information, but it is not yet
fed into a device postprocessor program.
As the GNU
is a wrapper program around
that automatically calls a
postprocessor, this output does not show up normally.
This is why it is called
program provides the option
to inhibit postprocessing, such that the produced
is sent to standard output just like calling
In this document, the term
describes what is output by the GNU
refers to the language that is accepted by the parser that prepares
this output for the postprocessors.
This parser is smarter on whitespace and implements obsolete elements
for compatibility, otherwise both formats are the same.
Both formats can be viewed directly with
The main purpose of the
concept is to facilitate the development of postprocessors by
providing a common programming interface for all devices.
It has a language of its own that is completely different from the
language is a high-level programming language for text processing, the
language is a kind of low-level assembler language by specifying all
positions on the page for writing and drawing.
versions are denoted as
is fairly readable, while
output was hard to understand because of strange habits that are
still supported, but not used any longer by
During the run of
input is cracked down to the information on what has to be printed at
what position on the intended device.
So the language of the
format can be quite small.
Its only elements are commands with or without arguments.
In this document, the term "command" always refers to the
language, never to the
language used for document formatting.
There are commands for positioning and text writing, for drawing, and
for device controlling.
Classical troff output
had strange requirements on whitespace.
output parser, however, is smart about whitespace by making it
The whitespace characters, i.e., the
characters, always have a syntactical meaning.
They are never printable because spacing within the output is always
done by positioning commands.
Any sequence of
characters is treated as a single
It separates commands and arguments, but is only required when there
would occur a clashing between the command code and the arguments
without the space.
Most often, this happens when variable length command names,
arguments, argument lists, or command clusters meet.
Commands and arguments with a known, fixed length need not be
A line break is a syntactical element, too.
Every command argument can be followed by whitespace, a comment, or a
syntactical line break
is defined to consist of optional
that is optionally followed by a comment, and a newline character.
The normal commands, those for positioning and text, consist of a
single letter taking a fixed number of arguments.
For historical reasons, the parser allows to stack such commands on
the same line, but fortunately, in
every command with at least one argument is followed by a line break,
thus providing excellent readability.
The other commands [em] those for drawing and device controlling [em]
have a more complicated structure; some recognize long command names,
and some take a variable number of arguments.
commands were designed to request a
syntactical line break
after their last argument.
Only one command,
has an argument that can stretch over several lines, all other
commands must have all of their arguments on the same line as the
command, i.e., the arguments may not be splitted by a line break.
Empty lines, i.e., lines containing only space and/or a comment, can
They are just ignored.
Some commands take integer arguments that are assumed to represent
values in a measurement unit, but the letter for the corresponding
is not written with the output command arguments; see
groff info file
for more on this topic.
Most commands assume the scale indicator~
the basic unit of the device, some use~
scaled point unit
of the device, while others, such as the color commands expect plain
Note that these scale indicators are relative to the chosen device.
They are defined by the parameters specified in the device's
Note that single characters can have the eighth bit set, as can the
names of fonts and special characters.
The names of characters and fonts can be of arbitrary length.
A character that is to be printed will always be in the current font.
A string argument is always terminated by the next whitespace
character (space, tab, or newline); an embedded
character is regarded as part of the argument, not as the beginning of
a comment command.
An integer argument is already terminated by the next non-digit
character, which then is regarded as the first character of the next
argument or command.
document consists of two parts, the
The task of the
is to set the general device parameters using three exactly specified
is guaranteed to consist of the following three lines (in that order):
n h v
with the arguments set as outlined in the section
Device Control Commands
But the parser for the
format is able to swallow additional whitespace and comments as well.
is the main section for processing the document data.
Syntactically, it is a sequence of any commands different from the
ones used in the
Processing is terminated as soon as the first