Subject: Re: [RFC suggestion] Generate manpage directly with Asciidoctor

From: Đoàn Trần Công Danh <[email-masked]>
Date: Fri, 7 May 2021 19:27:10 +0700

On 2021-05-07 13:06:31+0700, Bagas Sanjaya <[email-masked]> wrote:
> Hi,
> 
> Asciidoctor has support for directly generating manpage, see [1].

While I'm impressed with this news.

> We support using Asciidoctor as drop-in replacement for original
> Asciidoc, but currently we need to use xmlto together with Asciidoc(tor)
> to produce manpages. However, most users don't inclined to install
> xmlto toolchain, partly because they had to download more than 300 MB
> of data just to install xmlto and its dependencies (including dblatex
> and texlive).

I'm pretty sure xmlto doesn't depend on dblatex and/or texlive.

I'm building Git and Git's documentation on different Linux boxes with
asciidoc, most of them don't have dblatex and/or texlive.
In fact, I only have texlive installed in my laptop.

I guess you're using Debian or one of its derived distribution?
Debian puts dblatex as xmlto's rec. [2]

I think you can use:

	apt install --no-install-recommends xmlto

to avoid those recommendations.

> So completely migrating to Asciidoctor can eliminate xmlto requirement
> for generating manpage.
> 
> What do you think about above?

Hm, I'm pretty sure Ruby (asciidoctor's language) is very hard to port.
Last I heard, it's buggy on some platforms.

I think we're better to do like this:

* If we're using asciidoc, we will use xmlto
* If we're using asciidoctor, we will generate man-pages with
  asciidoctor directly

> [1]: https://docs.asciidoctor.org/asciidoctor/latest/manpage-backend/

[2]: https://packages.debian.org/sid/xmlto

-- 
Danh