groff
[Top][All Lists]
Advanced

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

Re: adjustment and hyphenation in mdoc(7) pages


From: Dave Kemper
Subject: Re: adjustment and hyphenation in mdoc(7) pages
Date: Fri, 24 Mar 2023 13:29:32 -0500

On 3/24/23, G. Branden Robinson <g.branden.robinson@gmail.com> wrote:
> This means that mdoc(7) authors will need to learn a habit that is often
> neglected by their man(7) rivals as well:
>
> Use the hyphenation control escape sequence wherever necessary.  It can
> suppress hyphenation of _any_ word it prefixes in _any_ context.

In regular roff documents, one can also use the .hw request to
globally suppress hyphenation of specified words.  This is often
preferable, as it doesn't require the user to (1) find and adorn every
instance of a word that ought not be broken, and (2) remember to
prepend a \% every time a new instance of that word is later added to
the text.  Let computers do algorithmic things.

In man documents, authors are discouraged from using low-level roff
requests.  But I wonder if .hw ought to be one of the exceptions.  An
author of a C-related man page will know they never want the keyword
"typedef" broken in any context.  Seems like they ought to be able to
tell the formatter once "Never hyphenate this word."

.hw is a longstanding (pre-groff) roff request, so should pose no
portability problems to roff-rendered man pages.  But I realize other
tools also parse man source, and don't know what portability concerns
that may raise.



reply via email to

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