Posted by
dzmitry.lahoda on
Oct 13, 2015; 3:54pm
URL: https://discuss.asciidoctor.org/Can-I-build-this-https-github-com-elastic-elasticsearch-definitive-guide-into-pdf-tp3845.html
Can I build this
https://github.com/elastic/elasticsearch-definitive-guide into pdf?
I see this book have some Atlas artifacts and is written of asciidoc files.
I tried AsciiDoc a2x but it failed with unknown error.
I have not tried Asciidoctor because still searching installation guide.
But for now question is it worth to try at all?
UPDATE: Got some html, but with errors(think miss some pages because) and missing toc.
C:\tools\ruby21\bin>asciidoctor --version
Asciidoctor 1.5.2 [
http://asciidoctor.org]
Runtime Environment (ruby 2.1.6p336 (2015-04-13 revision 50298) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:- ex:IBM437)
C:\tools\ruby21\bin>asciidoctor D:/elasticsearch-definitive-guide/book.asciidoc
asciidoctor: ERROR: 00_Getting_started.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 00_Getting_started.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 00_Getting_started.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 01_Search_in_depth.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 01_Search_in_depth.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 01_Search_in_depth.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 01_Search_in_depth.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 01_Search_in_depth.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 02_Dealing_with_language.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 02_Dealing_with_language.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 02_Dealing_with_language.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 02_Dealing_with_language.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 03_Aggregations.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 03_Aggregations.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 03_Aggregations.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 03_Aggregations.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 04_Geolocation.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 04_Geolocation.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 04_Geolocation.asciidoc: line 4: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 06_Modeling_your_data.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 06_Modeling_your_data.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 06_Modeling_your_data.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 06_Modeling_your_data.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 07_Admin.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 07_Admin.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 07_Admin.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: 07_Admin.asciidoc: line 5: only book doctypes can contain level 0 sections
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
asciidoctor: ERROR: partintro block can only be used when doctype is book and it's a child of a book part. Excluding block content.
UPDATE2: Got html without errors
C:\tools\ruby21\bin>asciidoctor D:/elasticsearch-definitive-guide/book.asciidoc -d book
Not in pdf yet
C:\tools\ruby21\bin>asciidoctor D:/elasticsearch-definitive-guide/book.asciidoc -b pdf -d book --trace
C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1362:in `rescue in load': asciidoctor: FAILED: D:/elasticsearch-definitive-guide/book.asciidoc: Failed to parse source, undefined method `convert' for nil:NilClass (NoMethodError)
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1281:in `load'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1458:in `convert'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
from C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
from C:/tools/ruby21/bin/asciidoctor:23:in `load'
from C:/tools/ruby21/bin/asciidoctor:23:in `<main>'
UPDATE3: I got pdf but generated with many many warnings and not toc yet.
asciidoctor-pdf D:/elasticsearch-definitive-guide/book.asciidoc -d book
I got 678 pages. Official book is 724. It to remove toc and cover and back and borders it may be OK and I do not miss text.