Search code examples
asciidocmanpage

a2x fails to compile my manpage


I have a an Asciidoc document foo.1.txt, and, following the instructions here, I tried to compile it with a2x as follows:

a2x --doctype manpage --format manpage foo.1.txt

After this, I got the following error:

a2x: ERROR: "/usr/bin/asciidoc.py" --backend docbook -a 
"a2x-format=manpage"  --doctype manpage  --out-file 
"/home/koz/Documents/foo.1.xml" 
"/home/koz/Documents/foo.1.txt" returned non-zero exit status 1

I am unsure what is going on, or how I can even diagnose what is wrong. An xml file is generated in the same folder (titled foo.1.xml) as part of this process. All help is appreciated.

EDIT: Based on use of the --verbose flag, the problem seems to be in this section:

COPYING
----------
 Copyright \(C) 2015, Koz Ross <koz.ross@runbox.com>. Free use of this software
is granted under the terms of the GNU General Public License (GPL) version 3, or
any later version.

The complaint is: [blockdef-listing] missing closing delimiter on the line where COPYING is.


Solution

  • COPYING
    ----------
     Copyright \(C) 2015, Koz Ross <koz.ross@runbox.com>. Free use of this software
    is granted under the terms of the GNU General Public License (GPL) version 3, or
    any later version.
    ----------
    

    works see http://asciidoctor.org/docs/asciidoc-writers-guide/#delimited-blocks and becomes:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
    <?asciidoc-toc?>
    <?asciidoc-numbered?>
    
    <article lang="en">
    <articleinfo>
        <date>2015-10-08</date>
    </articleinfo>
    <simpara>COPYING</simpara>
    <screen> Copyright \(C) 2015, Koz Ross &lt;koz.ross@runbox.com&gt;. Free use of this software
    is granted under the terms of the GNU General Public License (GPL) version 3, or
    any later version.</screen>
    </article>