groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to print a literal '.' as the first character in a line?


From: G. Branden Robinson
Subject: Re: How to print a literal '.' as the first character in a line?
Date: Sun, 1 May 2022 17:52:09 -0500

Hi, Alex--

At 2022-05-01T22:24:04+0200, Alejandro Colomar wrote:
> On 5/1/22 13:00, Ralph Corderoy wrote:
> > Hi Alejandro,
> >
> >> https://man.openbsd.org/mandoc_char#Accents
> >> https://man.openbsd.org/mandoc_char#Periods
> >
> > Or, more generally, which may be more useful in future,
> > CSTR 54 §4.1, https://troff.org/54.pdf, and
> >
> >      info groff Requests | less -j12 +/precede
> 
> Thank you too.
> 
> Branden, any chance you may add that to any groff manual page?

Already done!  I would have responded sooner but I've just completed (I
_think_) migrating my data to a new machine.  Moar cores, moar fun.

At any rate, groff_man(7) in groff 1.22.4 does in fact cover this.

[[
       \&     Zero-width space.  Append to an input line to prevent an
              end-of-sentence punctuation sequence from being
              recognized as such, or insert at the beginning of an
              input line to prevent a dot or apostrophe from being
              interpreted as the beginning of a roff request.
]]

In groff 1.23.0, this material will move to groff_man_style(7), since
groff_man(7) is meant to slim itself down to a reference for the macro
package proper, and not cover *roff language fundamentals.

groff 1.22.4's groff(7) has this.  groff 1.23.0 is similar.

[[
       \&     Non-printable, zero-width glyph.
]]

You could be forgiven for not inferring its utility in this case from
such a terse description.

In groff 1.23.0, we'll have this in roff(7), which will include much
other introductory material.

[[
       Any input line that is not a control line is a text line.  See
       section “Line continuation” in groff(7) for an exception to this
       rule.  Text lines generally become formatted output.  To start a
       text line with the control or no‐break control character, prefix
       the character with the \& escape sequence.
]]

Our Texinfo manual is similarly expanded.

[[
We have now encountered almost all of the syntax there is in the 'roff'
language, with an exception already noted in passing.  A "request" is an
instruction to the formatter that occurs after a control character.  A
"control character" must occur at the beginning of an input line to be
recognized.(1)  (*note Requests and Macros-Footnote-1::) The regular
control character has a counterpart, the "no-break control character",
which suppresses the break that is implied by some requests.  The
default control characters are the dot ('.') and the neutral apostrophe
('''), the latter being the no-break control character.  These
characters were chosen because it is uncommon for lines of text in
natural languages to begin them.  If you require a formatted period or
apostrophe (closing single quotation mark) where GNU 'troff' is
expecting a control character, prefix the dot or neutral apostrophe with
the non-printing input break escape sequence, '\&'.
]]

Do you find the above responsive to your request?  I sure hope so!

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]