On 1 November 2011 20:50, Simon Ruderich <[email protected]> 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:
>
Hi Simon,
Problem with the "solution" is that you are fixing the wrong problem,
the docbook produced by the standard asciidoc is valid by 1) my
inspection, 2) xmllint, 3) w3c validation service.
In other words the problem is in the xmlto processing, probably
whatever stylesheet it is choosing. You should address the problem
there to fix it at the source for all users of xmlto.
Since you have a workaround, in the meantime you can use it via a
docbook45.conf in your ~/.asciidoc or source directory so you don't
have to edit the system files.
Cheers
Lex
> 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
>
--
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.