Previous: Input Encodings, Up: Text [Contents][Index]
Since GNU troff
fills text automatically, it is common practice
in the roff
language to avoid visual composition of text in input
files: the esthetic appeal of the formatted output is what matters.
Therefore, roff
input should be arranged such that it is easy for
authors and maintainers to compose and develop the document, understand
the syntax of roff
requests, macro calls, and preprocessor
languages used, and predict the behavior of the formatter. Several
traditions have accrued in service of these goals.
\&
after ‘!’, ‘?’, and ‘.’ if they are
followed by space, tab, or newline characters and don’t end a sentence.
\&
before ‘.’ and ‘'’ if they
are preceded by space, so that reflowing the input doesn’t turn them
into control lines.
\"
,
which causes GNU troff
to ignore the remainder of the input line.
groff
project’s own documents use an empty request
between sentences, after macro definitions, and where a break is
expected, and two empty requests between paragraphs or other requests or
macro calls that will introduce vertical space into the document.
You can combine the empty request with the comment escape sequence to include whole-line comments in your document, and even “comment out” sections of it.
We conclude this section with an example sufficiently long to illustrate most of the above suggestions in practice. For the purpose of fitting the example between the margins of this manual with the font used for its typeset version, we have shortened the input line length to 56 columns. As before, an arrow → indicates a tab character.
.\" nroff this_file.roff | less .\" groff -T ps this_file.roff > this_file.ps →The theory of relativity is intimately connected with the theory of space and time. . I shall therefore begin with a brief investigation of the origin of our ideas of space and time, although in doing so I know that I introduce a controversial subject. \" remainder of paragraph elided . . →The experiences of an individual appear to us arranged in a series of events; in this series the single events which we remember appear to be ordered according to the criterion of \[lq]earlier\[rq] and \[lq]later\[rq], \" punct swapped which cannot be analysed further. . There exists, therefore, for the individual, an I-time, or subjective time. . This itself is not measurable. . I can, indeed, associate numbers with the events, in such a way that the greater number is associated with the later event than with an earlier one; but the nature of this association may be quite arbitrary. . This association I can define by means of a clock by comparing the order of events furnished by the clock with the order of a given series of events. . We understand by a clock something which provides a series of events which can be counted, and which has other properties of which we shall speak later. .\" Albert Einstein, _The Meaning of Relativity_, 1922 |
Previous: Input Encodings, Up: Text [Contents][Index]