Re: [PATCH] asciidoctor-extensions: provide `<refmiscinfo/>`
- From
Jeff King <peff@peff.net>
- Date
- Mar 19, 2019, 03:30 UTC
- Message-ID
- <20190319033023.GA25772@sigill.intra.peff.net>
- In-Reply-To
- <20190319024645.GA6173@sigill.intra.peff.net>
On Mon, Mar 18, 2019 at 10:46:45PM -0400, Jeff King wrote:
Show 14 quoted lines
> > * Provide the `mansource` attribute to Asciidoctor. This attribute > > looks promising until one realizes that it can only be given inside > > the source file (the .txt file in our case), *not* on the command > > line using `-a mansource=foobar`. I toyed with the idea of injecting > > this attribute while feeding Asciidoctor the input on stdin, but it > > didn't feel like it was worth the complexity in the Makefile. > > It does seem like "mansource" is the way asciidoctor expects us to do > this. Why doesn't it work from the command line? Is it a bug in > asciidoctor, or is there something more subtle going on? > > I think even if it is a bug and gets fixed, though, it still wouldn't > have the version field (though that seems like something we could > contribute to asciidoctor).
I just tried with asciidoc 2.0.0.rc.2, which came out last week. It does seem to work from the command line:
$ make USE_ASCIIDOCTOR=Yes \
ASCIIDOC_DOCBOOK=docbook5 \
ASCIIDOC='asciidoctor -amansource=Git -amanmanual="Git Manual"' \
git-add.xml
$ sed -n '/refmeta/,/refmeta/p' git-add.xml
<refmeta>
<refentrytitle>git-add</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">Git</refmiscinfo>
<refmiscinfo class="manual">Git Manual</refmiscinfo>
</refmeta>Still no "manversion" attribute, though.
-Peff