groff
[Top][All Lists]
Advanced

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

Re: Disable sentence spacing in tty output?


From: G. Branden Robinson
Subject: Re: Disable sentence spacing in tty output?
Date: Thu, 13 Aug 2020 20:58:12 +1000
User-agent: NeoMutt/20180716

At 2020-08-13T00:54:03-0700, k.st wrote:
> Hello everyone,
> 
> Is there a way to prevent groff from writing two spaces after end-of-
> sentence characters in tty output (mainly for man pages)?

Certainly.

You can add the following to your man.local file[1].

        .ss 12 0

Leave out the leading tab, of course.

> I noticed that many man page authors either does not follow semantic
> line-breaking or convert man pages from other formats such as asciidoc,
> pandoc, and scdoc. All of them has some problems handling sentence
> spaces and lead to inconsistent spacing in man pages.
> 
> For example, in git-push(1),
> 
>     --prune
>        Remove remote branches that don’t have a local counterpart. For
>        example a remote branch tmp will be removed if a local branch with
>        the same name doesn’t exist any more. This also respects refspecs,
>        e.g.  git push --prune remote refs/heads/*:refs/tmp/* would make
>        sure that remote refs/tmp/foo will be removed if refs/heads/foo
>        doesn’t exist.
> 
> It uses 1 space after period, and 2 spaces after 'e.g.'. Git uses
> asciidoc to convert man pages, which does not handle sentence spacing
> very well.

The problem here, as with so many others (like man pages sources that
are painful at best to read) is to be laid at the doorstep of
docbook-to-man.

> The only solution for me might be to disable sentence spacing entirely.
> I wonder if there are options/macros to disable this? I known man(1)
> from man-db has `--nh` and `--nj` options to disable hyphenation and
> justification. Is it possible to have some kind of option similar to
> those?

Let us know how you fare with the above.  If you want to turn it off
only for typesetter (vs. terminal) devices, or even for a specific
output driver (utf8, pdf, etc.), that is easily done as well.

[1] On my Debian system, this file is in /etc/groff/man.local, but your
distributor may place it somewhere else.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

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