Hello,

While building the Git man pages with DocBook 4.5, DocBook-XSL
1.75.2 (on Debian Squeeze) and current AsciiDoc tip I found an
error in a man page with footnotes. The following minimum sample
reproduces the issue:

    test(1)
    =======

    NAME
    ----
    test - simple test

    DESCRIPTION
    -----------
    Text ... footnote:[Simple footnote].

    Author
    ------
    ...

Running the following commands to create the manpage yields this
error:

    $ asciidoc -b docbook -d manpage test.txt
    $ xmlto man test.xml
    Warn: endnote  #1 : Bad: footnote[1] in source                     test
    Note: endnote  #1 : Has: footnote/simpara                          test
    Note: endnote  #1 : Fix: footnote/para/simpara                     test

The man page also looks not quite right:

    [...]
    NOTES
            1.

               Simple footnote

The following patch fixes the error, but I don't have much
DocBook experience, so there might be a better solution:

diff --git a/docbook45.conf b/docbook45.conf
index 04e1aa4..9bd7c7e 100644
--- a/docbook45.conf
+++ b/docbook45.conf
@@ -125,7 +125,16 @@ latexmath-style=template="latexmathblock",subs=[]

 [footnote-inlinemacro]
 # Footnote.
+ifndef::doctype-manpage[]
 <footnote><simpara>{0}</simpara></footnote>
+endif::doctype-manpage[]
+ifdef::doctype-manpage[]
+# Prevents the following warning if footnotes are used.
+# Warn: endnote  #1 : Bad: footnote[1] in source
+# Note: endnote  #1 : Has: footnote/simpara
+# Note: endnote  #1 : Fix: footnote/para/simpara
+<footnote><para>{0}</para></footnote>
+endif::doctype-manpage[]

 [footnoteref-inlinemacro]
 # Footnote reference.

And the output looks fine now:

    [...]
    NOTES
            1. Simple footnote

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: pgpSaApazJjoJ.pgp
Description: PGP signature

Reply via email to