Linux Manual Pages development
 help / color / mirror / Atom feed
From: "astian" <astian@memeware.net>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>,
	"Alejandro Colomar" <alx@kernel.org>
Cc: "linux-man" <linux-man@vger.kernel.org>
Subject: Re: ioperm(2): confusing terminology
Date: Thu, 17 Sep 2026 19:08:44 +0000	[thread overview]
Message-ID: <DLHTTJ9FETPL.27KU2F08VUTLP@memeware.net> (raw)
In-Reply-To: <20260917123845.valu5ro5zur23o56@illithid>

On 17 Sep 2026 07:38 -0500, G. Branden Robinson wrote:
> Hi Alex,
>
> At 2026-09-17T13:00:30+0200, Alejandro Colomar wrote:
>> > Date: 2026-09-17 07:04:37+0000
>> > From: astian <astian@memeware.net>
>> > On 14 Sep 2026 14:56 +0200, Alejandro Colomar wrote:
>> > [...]
>> > > One thing that is very important is that we use semantic newlines.
>> > > That discards .md and .rst, since they are meant to be written
>> > > with paragraphs as they'd be read by humans.
>> >
>> > Sorry, I didn't read groff_man fully, but I'm curious: what is the
>> > meaning of newlines in man that gets lost in those other formats?
>>
>> They have no meaning.
>
> I wouldn't go that far.
>
> Like TeX, *roff uses newlines, _in context_, to help it automatically
> decide where sentence boundaries are.
>
> Because the formatter, not the macro package, makes that decision, the
> rules are documented not in groff_man_(7), but roff(7) and groff's
> Texinfo manual.  If a person follows the "semantic newline" guidance
> from man-pages(7), they can worry less often about what the rules for
> automatic sentence boundary detection are.
>
> roff(7):
>
> Input conventions
>      Since a roff formatter fills text automatically, its experienced
>      users tend to avoid visual composition of text in input files: the
>      esthetic appeal of the formatted output is what matters.
>      Therefore, roff input should be arranged such that it is easy for
>      authors and maintainers to compose and develop the document,
>      understand the syntax of roff requests, macro calls, and
>      preprocessor languages used, and predict the behavior of the
>      formatter.  Several traditions have accrued in service of these
>      goals.
>
>      •  Follow sentence endings in the input with newlines to ease their
>         recognition.  It is frequently convenient to end text lines
>         after colons and semicolons as well, as these typically precede
>         independent clauses.  Consider doing so after commas; they often
>         occur in lists that become easy to scan when itemized by line,
>         or constitute supplements to the sentence that are added,
>         deleted, or updated to clarify it.  Parenthetical and quoted
>         phrases are also good candidates for placement on text lines by
>         themselves.

Thanks.

So, if I'm understanding this right, the newlines are semantic only
insofar as letting the formatter know that it should insert an
additional space if the character before the newline is a dot.  Right?

(PS: More or less:
https://www.gnu.org/software/groff/manual/groff.html.node/Sentences.html)

> Following this practice also helps keep document revisions from
> "bleeding" into unaltered adjacent sentences in a diff.  (I think it's
> worth studying why the Markdown/AsciiDoc/"plain text markup" communities
> have not independently re-created this practice.)

I don't find this surprising.  The whole point of those formats is that
they look nice enough and read smoothly enough in their source form
(insert small-letter caveats here).  If we start putting in line breaks
for the purpose of nicer diffs we soon lose the smoothness and get some
of the *roff-like hairiness ;).

Regarding the delimiting of sentences, it doesn't seem like the most
typical rendered outputs for those formats (HTML, PDF) cares about
putting the correct number of spaces after a dot ;).

And yet it turns out this exists:

  https://asciidoctor.org/docs/asciidoc-recommended-practices/

  One Sentence Per Line

  Don't wrap text at a fixed column width.  Instead, put each sentence
  on its own line, a technique called sentence per line.  This technique
  is similar to how you write and organize source code.  The result can
  be spectacular.

Kinda defeats the goal of having a nicely formatted source, but if one
were to consistently use that convention, then whatever program is used
to turn adoc into man already has the sentence problem solved at the
source, and whatever program is used to turn adoc into final
presentation format can know where a double-space sentence separator
needs to go, if so desired.

  parent reply	other threads:[~2026-09-17 19:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 22:00 ioperm(2): confusing terminology astian
2026-09-12 22:24 ` Alejandro Colomar
2026-09-12 22:48   ` Alejandro Colomar
2026-09-13  6:29   ` astian
2026-09-14 12:56     ` Alejandro Colomar
2026-09-15 15:39       ` Markdown as a "less hairy" source format for man pages (was: ioperm(2): confusing terminology) G. Branden Robinson
2026-09-17  7:05         ` Markdown as a "less hairy" source format for man pages astian
2026-09-17  7:04       ` ioperm(2): confusing terminology astian
2026-09-17 11:00         ` Alejandro Colomar
2026-09-17 19:09           ` astian
2026-09-17 19:34             ` Alejandro Colomar
2026-09-17  6:16   ` [PATCH 1/2] man/man2/ioperm.2: Reword slightly for clarity astian
2026-09-17 11:59     ` Alejandro Colomar
2026-09-17  6:16   ` [PATCH 2/2] man/man2/ioperm.2: wfix astian
2026-09-17 11:59     ` Alejandro Colomar
2026-09-17 12:38       ` ioperm(2): confusing terminology G. Branden Robinson
2026-09-17 13:18         ` Alejandro Colomar
2026-09-17 19:08         ` astian [this message]
2026-09-17 23:02           ` G. Branden Robinson
2026-09-17 19:11       ` [PATCH 2/2] man/man2/ioperm.2: wfix astian
2026-09-17 19:58       ` [PATCH] man/man5/proc_ioports.5: wfix astian
2026-09-17 23:09         ` G. Branden Robinson
2026-09-17 23:16           ` Alejandro Colomar
2026-09-18  7:03         ` [PATCH v2] " astian
2026-10-11 17:11           ` Alejandro Colomar
2026-09-17 19:57     ` [PATCH v2] man/man2/ioperm.2: wfix astian
2026-10-11 17:12       ` Alejandro Colomar
2026-10-11 17:13         ` Alejandro Colomar
2026-10-11 20:25           ` astian

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=DLHTTJ9FETPL.27KU2F08VUTLP@memeware.net \
    --to=astian@memeware.net \
    --cc=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --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