public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man <linux-man@vger.kernel.org>
Subject: Re: Replace \f where appropriate
Date: Sat, 15 Jul 2023 21:58:12 -0500	[thread overview]
Message-ID: <20230716025812.3cssvd4lfnh7c23i@illithid> (raw)
In-Reply-To: <7111dade-2e26-eaf6-6ecd-13c3111d2b15@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]

Hi Alex,

At 2023-07-16T04:22:18+0200, Alejandro Colomar wrote:
> As you may have noticed, we're now using the recent SPDX tags, which
> were added in a recent SPDX release.  Next plan I have for the project
> is to stop using \f escapes where unnecessary.  I'll start tomorrow,

Hooray!  Let me reiterate, for those who are not man(7) experts, why
font style macros should be preferred, where possible, to \f escape
sequences.

* The macros integrate more easily with spell checking systems.
  Contrast
    .I length
  with
    \fIlenth\fP
  for example.

  Here, a text editor like vim(1) will mark the latter as misspelled
  because of the leading "fI", and you may not notice the actual
  spelling error within.  The many false positives frustrate page
  maintenance and lower page quality by increasing tolerance for
  spelling errors.

  groff's \f[] syntax for font changes is helpful here, but some
  projects want page sources that are portable to AT&T troff, which yet
  lives on Solaris 10 and possibly other places.  Such projects may also
  complain that the brackets require "more typing".

  Font style macros are less typing than both forms of escape sequence.

* In groff man(7), font style macros take care of italic corrections for
  you.  If you only ever read man pages at a terminal you won't care
  about this.  But if you want your man pages to look good in print,
  sooner or later you will start caring.

> Branden, since this may affect your work in scripting the change to
> start using the MR macro, I'll keep you updated about it.

I appreciate it.  I don't expect much frustration because my procedure
is as follows.

1.  Start from a clean checkout.
2.  Dump all the non-.so man pages as plain text[2] to a file.
3.  Execute a sed script.
4.  Dump all the non-.so man pages as plain text to another file.
5.  Diff the two text files.
6.  Revise the sed script.
7.  "git co man*"
8.  Go to step 3.

Eventually, I will be able to break the loop after step 5.

Regards,
Branden

[1] If a man page is updated more frequently than it is read, even by
    its sole author, I think it is likely to be of poor quality.
    Nevertheless, the world is not short of people who claim to produce
    perfect work on the first attempt, and groff attempts to serve them
    as well.

[2] groff -t -mandoc -T ascii -P -cbou

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2023-07-16  2:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-16  2:22 Replace \f where appropriate Alejandro Colomar
2023-07-16  2:58 ` G. Branden Robinson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230716025812.3cssvd4lfnh7c23i@illithid \
    --to=g.branden.robinson@gmail.com \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox