[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How \c works (was: removing the .IX macro from the ms package in 1.23 br
From: |
G. Branden Robinson |
Subject: |
How \c works (was: removing the .IX macro from the ms package in 1.23 breaks old documents) |
Date: |
Wed, 2 Oct 2024 19:38:19 -0500 |
Hi Tadziu,
At 2024-10-03T02:14:44+0200, Tadziu Hoffmann wrote:
> > <https://lists.gnu.org/archive/html/groff/2022-06/msg00026.html>.
>
> I must have been blissfully unaware of this discussion.
>
> However, I want to caution against the idea that "\c" continues
> an *input* line. "\c" is something that concerns the *output*.
[snip]
I emphatically agree, and that is how I have documented it. If I
managed to mumble something misleading, or contradictory, in that
discussion thread 2 years ago, please disregard such utterances.
groff(7):
Line continuation
When filling is enabled, input and output line breaks generally do
not correspond. The roff language therefore distinguishes input
and output line continuation.
A backslash \ immediately followed by a newline, sometimes
discussed as \newline, suppresses the effects of that newline on
the input. The next input line thus retains the classification of
its predecessor as a control or text line. \newline is useful for
managing line lengths in the input during document maintenance; you
can break an input line in the middle of a word, request
invocation, macro call, or escape sequence. Input line
continuation is invisible to the formatter, with two exceptions:
the | operator recognizes the new input line, and the input line
counter register .c increments.
The \c escape sequence continues an output line. Nothing on the
input line after it is formatted. In contrast to \newline, a line
after \c is treated as a new input line, so a control character is
recognized at its beginning. The visual results depend on whether
filling is enabled. An intervening control line that causes a
break overrides \c, flushing out the pending output line in the
usual way. The register .int contains a positive value if the last
output line was continued with \c; this datum is associated with
the environment.
Much of this language also appears in our Texinfo manual, along with
examples.
https://www.gnu.org/software/groff/manual/groff.html.node/Line-Continuation.html
> If we want to change the semantics of "\c" to mean continuation
> of the input line,
I don't propose doing so; we already have a means of input line
continuation, and, blissfully, it seems to be easy for users, at least
those accustomed to shell scripts, to understand.
Regards,
Branden
signature.asc
Description: PGP signature