mbox series

[v3,0/3] asciidoctor-extensions: provide `<refmiscinfo/>`

Message ID cover.1568658269.git.martin.agren@gmail.com (mailing list archive)
Headers show
Series asciidoctor-extensions: provide `<refmiscinfo/>` | expand

Message

Martin Ågren Sept. 16, 2019, 7 p.m. UTC
Here's v3 of ma/asciidoctor-refmiscinfo to align the headers and footers
of Asciidoctor-rendered manpages with those from AsciiDoc. Patch 1 is
new.

It turns out that with newer (>=1.5.7) versions of Asciidoctor, we get
default values of these refmiscinfo attributes put into the xml. The
hack in patch 2/3 (previously patch 1/2) happened to inject these
attributes after the default ones and it seems like the earlier ones
happen to win when xmlto processes the xml. This explains what Peff
noticed in [1], where the attribute values introduced by the hacky patch
2 are effectively ignored and blank values are used instead.

Rather than trying to game the order of those attributes, I decided to
do a patch 1 which uses a saner way of providing these attributes to
Asciidoctor. This allowed me to reframe patch 2 from "fix all of these
attributes with Asciidoctor" to "fix some of them with some Asciidoctor
versions".

My test results:

  AsciiDoc (8.6.10): Each patch in this series is a no-op.

  Asciidoctor 1.5.5 and 1.5.6: Patch 1/3 is a no-op. Patch 2/3 fixes the
  header/footer to be as with AsciiDoc, except for how the date is
  rendered.

  Aciidoctor 1.5.7 and 2.0.10 [2]: Patch 1/3 fixes the header/footer
  partially -- the version number is still missing. Patch 2/3 fixes the
  version number, after which the header/footer are just as with
  AsciiDoc, except for how the date is rendered.

  So in short, "all" versions of Asciidoctor now render the headers and
  footers like AsciiDoc does, except for the date formatting.

[1] https://public-inbox.org/git/20190913050634.GB21172@sigill.intra.peff.net/

[2] The tests with 2.0.10 were done on top of brian's recent patch to
build at all with Asciidoctor 2:
https://public-inbox.org/git/20190915224332.103930-1-sandals@crustytoothpaste.net/

Martin Ågren (3):
  Doc/Makefile: give mansource/-version/-manual attributes
  asciidoctor-extensions: provide `<refmiscinfo/>`
  doc-diff: replace --cut-header-footer with --cut-footer

 Documentation/Makefile                  |  3 ++-
 Documentation/asciidoc.conf             |  6 +++---
 Documentation/asciidoctor-extensions.rb | 17 +++++++++++++++++
 Documentation/doc-diff                  | 17 ++++++++---------
 4 files changed, 30 insertions(+), 13 deletions(-)