From: "Theodore Ts'o" <tytso@mit.edu>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Dimitri John Ledkov <dimitri.ledkov@canonical.com>,
linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: Converting manpages from asciidoc to rst2man ?
Date: Mon, 4 Dec 2023 23:01:26 -0500 [thread overview]
Message-ID: <20231205040126.GF509422@mit.edu> (raw)
In-Reply-To: <87fs0iujaj.fsf@meer.lwn.net>
On Mon, Dec 04, 2023 at 07:36:04AM -0700, Jonathan Corbet wrote:
>
> In general we don't have a lot of man pages in the kernel, so it's not
> something we've put a lot of thought into. Ideally, I suppose, it would
> be nice to get all of those man pages integrated into the RST docs
> build, but it's not something that is likely to inspire any great sense
> of urgency.
These manpages (at least the perf ones) are actually translated into
nroff/troff's -man macro format using asciidoctor so that things like
"man perf": For example, from Debian testing's "linux-perf" package:
% gunzip < /usr/share/man/man1/perf.1.gz | head
'\" t
.\" Title: perf
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.20
.\" Date: 2023-11-03
.\" Manual: perf Manual
.\" Source: perf
.\" Language: English
.\"
.TH "PERF" "1" "2023-11-03" "perf" "perf Manual"
% dpkg -S /usr/share/man/man1/perf.1.gz
diversion by linux-perf from: /usr/share/man/man1/perf.1.gz
diversion by linux-perf to: /usr/share/man/man1/perf.wrapper.1.gz
linux-perf: /usr/share/man/man1/perf.1.gz
I guess we could try to use rst2man to do the same thing, but it's a
lot more than just "make it look nice" when rendered into HTML and pdf
when processfing the .rst file. We need to make sure that after the
rst file is turned into a -man text file, that it looks good when
postsprocess via "groff -man -T utf8" *and* "groff -man -T pdf".
It would also mean that python3-docutils would have to be installed
when building kernel docs (to provide the rst2man command), but then
again, it would remove the need to have asciidoctor installed....
Cheers,
- Ted
prev parent reply other threads:[~2023-12-05 4:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 14:25 Converting manpages from asciidoc to rst2man ? Dimitri John Ledkov
2023-12-04 14:36 ` Jonathan Corbet
2023-12-04 21:21 ` Ian Rogers
2023-12-05 4:01 ` Theodore Ts'o [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=20231205040126.GF509422@mit.edu \
--to=tytso@mit.edu \
--cc=corbet@lwn.net \
--cc=dimitri.ledkov@canonical.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-perf-users@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;
as well as URLs for NNTP newsgroup(s).