ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

a2x: error: argument --dblatex-opts: expected one argument #278

Closed kianmeng closed 2 years ago

kianmeng commented 2 years ago

Encountered this error when generating the documentation. Not sure if I miss out anthing.

Running on:

$ a2x --version
a2x 9.0.0rc2
$ make docs
 GEN    distclean-asciidoc-guide
make[1]: Entering directory '/tmp/gun/deps/asciideck'
make[1]: Leaving directory '/tmp/gun/deps/asciideck'
a2x -v -f pdf doc/src/guide/book.asciidoc && mv doc/src/guide/book.pdf doc/guide.pdf
usage: usage: a2x [OPTIONS] ASCIIDOC_FILE
a2x: error: argument --dblatex-opts: expected one argument
make: *** [erlang.mk:5693: asciidoc-guide] Error 2
essen commented 2 years ago

I'm on a2x 9.0.2 no problem.

kianmeng commented 2 years ago

I'm on a2x 9.0.2 no problem.

@essen I re-read the doc again, it's stated, While still online, run make docs. What is still online here? Did I miss out anything?

essen commented 2 years ago

It's just to fetch the asciideck dependency.

kianmeng commented 2 years ago

Closed as I've resolved this.

It seemed that the a2x, version 9.0.0rc2 that came from Ubuntu 21.10 (Impish) repository was dated, buggy, or incompatible with the usage here. I can't install 9.0.2 through pip, which seemed to be deprecated:

$ pip install asciidoc==9.0.2
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement asciidoc==9.0.2 (from versions: 10.0.0a1, 10.0.0a2, 10.0.0, 10.0.1, 10.0.2, 10.1.0, 10.1.1)
ERROR: No matching distribution found for asciidoc==9.0.2

However, documentation can be generated using the latest asciidoc version, 10.1.1:


$ pip install asciidoc

$ a2x --version; asciidoc --version
a2x 10.1.1
asciidoc 10.1.1

$ make docs
 GEN    distclean-asciidoc-guide                                                          
make[1]: Entering directory '/tmp/gun/deps/asciideck'                                     
make[1]: Leaving directory '/tmp/gun/deps/asciideck' 
...
 ADOC   doc/src/manual/gun_ws.asciidoc
 ADOC   doc/src/manual/gun.ws_send.asciidoc
 ADOC   doc/src/manual/gun.ws_upgrade.asciidoc