On 01/11/11 22:50, Simon Ruderich wrote:
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
Hi Simon
I'm running the same version of DocBook XSL Stylesheets (Xubuntu) but I don't
get any footnotes when a run it through a2x (with or without your patch), when I
run xmlto (version 0.0.23) footnotes work fine without the patch so xmlto must
have customized stylesheets.
Cheers, Stuart
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.