Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
This post was updated on Oct 13, 2015; 4:44pm.
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. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
You'd have to ask the elasticsearch people, or use trial and error. I don't see any helps in that repo for generating the docs. On Tue, Oct 13, 2015 at 9:54 AM, dzmitry.lahoda [via Asciidoctor :: Discussion] <[hidden email]> wrote: Can I build this https://github.com/elastic/elasticsearch-definitive-guide into pdf? -- |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
In reply to this post by dzmitry.lahoda
On Tue, Oct 13, 2015 at 9:54 AM, dzmitry.lahoda [via Asciidoctor :: Discussion] <[hidden email]> wrote: I have not tried Asciidoctor because still searching installation guide. http://asciidoctor.org/docs/install-toolchain/ -Dan |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
In reply to this post by dzmitry.lahoda
On Tue, Oct 13, 2015 at 3:15 PM, Dan Allen <[hidden email]> wrote:
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thanks.
I seems made things as I want (I got pdf with toc) asciidoctor -r asciidoctor-pdf -d book -b pdf -a toc D:/elasticsearch-definitive-guide/book.asciidoc But I saw dozens of errors in attached book.txt. Are these errors mean loss of text? I generate HTML without errors and print if into PDF via Chromium, but then TOC does not have page numbers:(. In case of asciidoctor to pdf directly if see errors and afraid of some loss of data:( Not sure what is better. What I did - I found that book has Atlas artifacts in it. I found that book published by OReally. Atlas needs reg code to get it. I have no. So I tried you tool and got pdf with toc. Actually book contains these bad artifacts: Lucene, the Java libraries on which Elasticsearch is based, introduced the concept of <em>per- segment search</em>. A <em>segment</em> is an inverted index in its own right, but now the word <em>index</em> in Lucene came to mean a <em>collection of segments</em> plus a <em>commit point</em>—a file that lists all known segments, as depicted in A Lucene index with a commit point and three segments. New documents are first added to an in-memory indexing buffer, as shown in A Lucene index with new documents in the in-memory buffer, ready to commit, before being written to an on-disk segment, as in After a commit, a new segment is added to the commit point and the buffer is cleared I suggest next things: 1. I do not find Donate button. Could you add somewhere this? 2. http://asciidoctor.org/ slightly frightens me as Widows user. From start I see Ruby, JVM and Linux. As and user I expect too see just installation guide right at top of page. Left details if I have problems with installation or for who, is interested into bottom. 3. Fix HTML parsing errors during PDF generation (`Failed to parse formatted text`). At least for book i generated which as I undrestand work well with Atlas. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
On Wed, Oct 14, 2015 at 6:20 AM, dzmitry.lahoda [via Asciidoctor :: Discussion] <[hidden email]> wrote: But I saw dozens of errors in attached `book.txt`. Are these errors mean loss of text? There's no loss of text. Asciidoctor PDF does not drop text. Instead, it inserts the text without formatting it. These errors all stem from the fact that Asciidoctor PDF does not (yet) support arbitrary character entities (e.g., —). These are being used in many places in this manuscript to provide dashes and other special characters. Attribute references should be used instead so that they can be properly substituted globally. For instance, in this case: will find all ages older than 30—`gt` stands for _greater than_. should be: will find all ages older than 30{emdash}`gt` stands for _greater than_. This not only allows us to deal with differences in backend, it also makes it much, much clearer to the author what that character is. Asciidoctor PDF can handle the actual Unicode glyph, which could be injected if an attribute were used at these places. I found that book has Atlas artifacts in it. I would prefer if O'Reilly stayed within the spirit of AsciiDoc. There are many ways to extend the AsciiDoc syntax and it is encouraged. If we use this official system of extension (inline macros, block macros, custom blocks, etc), then we can ensure portability between the tools. Otherwise, we drift into the territory where Markdown is, where everyone has different syntax and tools can't easily be created. Extensions are designed to keep us on the same page. Cheers, |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
In reply to this post by dzmitry.lahoda
On Thu, Oct 15, 2015 at 1:06 AM, Dan Allen <[hidden email]> wrote: This not only allows us to deal with differences in backend, it also makes it much, much clearer to the author what that character is. And if I wasn't clear enough, I strongly discourage the use of character entities directly in the AsciiDoc source. When in doubt, use attributes. |
Free forum by Nabble | Edit this page |