Code Monkey home page Code Monkey logo

asciidoctor-epub3's Introduction

Asciidoctor EPUB3: A native EPUB3 converter for AsciiDoc

project chat Latest Release GitHub Actions

Asciidoctor EPUB3 is a set of Asciidoctor extensions for converting AsciiDoc documents directly to the EPUB3 e-book format.

Documentation

Detailed installation and usage instructions can be found on the Asciidoctor Docs site.

Installation

Asciidoctor EPUB3 is published on RubyGems.org. Asciidoctor EPUB3 requires Ruby 2.6 or newer. You can install the published gem using the following command:

$ gem install asciidoctor-epub3

Assuming the gem and its dependencies install properly, verify you can run the asciidoctor-epub3 script:

$ asciidoctor-epub3 -v

If you see the version of Asciidoctor EPUB3 printed, you’re ready to use Asciidoctor EPUB3.

Usage

Converting an AsciiDoc document to EPUB3 is as simple as passing your document to the asciidoctor-epub3 command. This command should be available on your PATH if you installed the asciidoctor-epub3 gem. Otherwise, you can find the command in the bin folder of the project. We also recommend specifying an output directory using the -D option flag.

$ asciidoctor-epub3 -D output path/to/book.adoc

When the script completes, you’ll see the file book.epub appear in the output directory. Open that file with an EPUB3 reader to view the result.

Contributing

In the spirit of free software, everyone is encouraged to help improve this project.

To contribute code, simply fork the project on GitHub, hack away and send a pull request with your proposed changes.

Feel free to use the issue tracker or {uri-discuss}[Asciidoctor mailing list] to provide feedback or suggestions in other ways.

Development

To help develop Asciidoctor EPUB3, or to simply test drive the development version, you need to get the source from GitHub. Follow the instructions below to learn how to clone the source and run it from your local copy.

Retrieve the Source Code

You can retrieve Asciidoctor EPUB3 in one of two ways:

  1. Clone the git repository

  2. Download a zip archive of the repository

Option 1: Fetch Using git clone

If you want to clone the git repository, simply copy the {uri-repo}[GitHub repository URL] and pass it to the git clone command:

$ git clone {uri-repo}

Next, change to the project directory:

$ cd asciidoctor-epub3

Option 2: Download the Archive

If you want to download a zip archive, click on the btn:[[cloud download] button on the right-hand side of the repository page on GitHub. Once the download finishes, extract the archive, open a console and change to that directory.

Tip
Instead of working out of the asciidoctor-epub3 directory, you can simply add the absolute path of the bin directory to your PATH environment variable.

We’ll leverage the project configuration to install the necessary dependencies.

Prepare RVM (optional step)

If you’re using RVM, we recommend creating a new gemset to work with Asciidoctor EPUB3:

$ rvm use 2.2@asciidoctor-epub3-dev --create

We like RVM because it keeps the dependencies required by various projects isolated.

Install the Dependencies

The dependencies needed to use Asciidoctor EPUB3 are defined in the Gemfile at the root of the project. We can use Bundler to install the dependencies for us.

To check if you have Bundler available, use the bundle command to query the version installed:

$ bundle --version

If it’s not installed, use the gem command to install it.

$ gem install bundler

Then use the bundle command to install the project dependencies:

$ bundle
Note
You need to call bundle from the project directory so that it can find the Gemfile.

Build and Install the Gem

Now that the dependencies are installed, you can build and install the gem.

Use the Rake build tool to build and install the gem (into the current RVM gemset or into the system if not using RVM):

$ rake install:local

The build will report that it built the gem into the pkg directory and that it installed the gem.

Once the development version of the gem is installed, you can run Asciidoctor EPUB3 by invoking the asciidoctor-epub3 script:

$ asciidoctor-epub3 -v

If you see the version of Asciidoctor EPUB3 printed to your console, you’re ready to use Asciidoctor EPUB3!

Shortcut: Run the Launch Script Directly

Assuming all the required gems install properly, you can run the asciidoctor-epub3 script directly out of the project folder using either:

$ bin/asciidoctor-epub3 -v

or

$ bundle exec bin/asciidoctor-epub3 -v

You’re now ready to test drive the development version of Asciidoctor EPUB3!

Jump back to [Getting Started] to learn how to create an AsciiDoc document and convert it to EPUB3.

Fonts

Asciidoctor EPUB3 embeds a set of fonts and font icons. The theme’s fonts are located in the data/fonts directory.

The M+ Outline fonts are used for titles, headings, literal (monospace) text, and annotation numbers. The body text uses Noto Serif. Admonition icons and the end-of-chapter mark are from the Font Awesome icon font. Refer to the NOTICE.adoc file for further information about the fonts.

Planned Features and Work In Progress

Authors

Asciidoctor EPUB3 was written by Dan Allen and Sarah White of OpenDevise on behalf of the Asciidoctor Project.

Copyright © 2014-2021 OpenDevise Inc. and the Asciidoctor Project. Free use of this software is granted under the terms of the MIT License.

For the full text of the license, see the LICENSE file. Refer to the NOTICE.adoc file for information about third-party Open Source software in use.

asciidoctor-epub3's People

Contributors

abbrev avatar amejiarosario avatar chkal avatar chloerei avatar dependabot-preview[bot] avatar dependabot[bot] avatar eiswind avatar gambhiro avatar gdamore avatar hepabolu avatar jnavila avatar lulalala avatar michaelpj avatar mojavelinux avatar neontapir avatar primaryfeather avatar rmschindler avatar rpietzsch avatar rvolz avatar slonopotamus avatar someth2say avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asciidoctor-epub3's Issues

Hyperlinks to Bibliography does not work

Consider the following

toplevel.adoc (snippet of full toplevel document)

[chapter]
= Section title

include::aFile.adoc[]

[chapter]
= Bibliography

include::bib.adoc[]

aFile.adoc (the included section)

== A file
with text
== and this reference
* <<TestRef,Test reference text>>

bib.adoc (the included bibliography)

ifdef::backend-epub3[]
== Bibliography
endif::backend-epub3[]
[bibliography]
== Bib Section
- [[[TestRef]]] ysb33r. https://github.com/asciidoctor/asciidoctor-epub3

When rendered the TestRef will show up as a hyperlink, but when clicked will not move the document to the bibliography section

kf8 Export doesn't display TIP, NOT or IMPORTANT images

I use asciidoctor-epub3 to export to kf8 for Kindle. The result looks beautiful but is misses the little images next to TIP, NOTE and IMPORTANT. I guess the files are missing or there is an error in the CSS.

I use this command to render the kf8 version:

asciidoctor-epub3 -D output -a ebook-format=kf8 book.adoc

Allow fonts to be specified / customized

While it's possible to use custom epub3.css and epub3-css3-only.css files, it's not possible to override the epub3-fonts.css file and, with it, alternative fonts. It should be possible to override the fonts as well.

The way the packager works is that it scans the epub3-fonts.css file for font references and packages those fonts in the archive. Therefore, we we'll also need to honor the epub3-fontsdir property to control how these fonts are resolved.

:front-cover-image: not overriding the default AsciiDoctor cover image

I am using this syntax inside the master file to include a cover image (while experimenting with ASCIIDoc to EPUB):

: front-cover-image: image: cover.png[width=1050, height=1600]

but it doesn't seem to override the default asciidoc cover image. My own image i.e. cover.png lies in an images folder that exists inside the same folder as the AsciiDoc master file.

The entire code inside the master file is this:

 Author Name
 v1.0, 2014-04-15
 :front-cover-image: image:cover.png[width=1050,height=1600]
 :doctype: book
 :producer: Asciidoctor
 :keywords: Asciidoctor, samples, e-book, EPUB3, KF8, MOBI, Asciidoctor.js
 :copyright: CC-BY-SA 3.0
 :imagesdir: images

 include::practice.adoc[]

Could anyone please let me know what could be going wrong. Thanks!

ebook-format=kf8 doesn't have/use monospace font?

This may be a known problem...? Or is my setup wrong?

I find that code fragments (backticked text, listings) aren't rendered in monospace when I generate kf8 (.mobi) output using asciidoctor-epub3 -a ebook-format=kf8. They are rendered correctly in the default .epub output however. And the monospace is preserved when I convert that .epub to .mobi via calibre. It's just that asciidoctor-epub3 is unable to honor monospace when generating .mobi directly.

Built-in support for stem blocks

I'm using Asciidoctor to convert a programming text book from print to electronic format. Therefore, I need epub, mobi, and PDF to be able to handle math expressions.

Please can you add stem support to asciidoctor-epub3?

Converter should be able to process any AsciiDoc document

Currently, the converter is very picky about the structure of the AsciiDoc document. When the document isn't exactly as it expects (see https://github.com/asciidoctor/asciidoctor-epub3#declaring-the-spine), it fails in often spectacular ways. This problem appears in all of the following issues:

Instead, the converter should be able to handle any AsciiDoc document and do what it can to produce a sane result (or issue a clear error or warning otherwise). Naturally, the best result will be achieved when the structure is followed, but that should be a refinement rather than a prerequisite.

This is an umbrella issue to aggregate all these issues into one and clearly specify what needs to happen to fix it.

Disable avatars?

Hi,

I’m using asciidoctor-epub3 to create a novel-style EPUB, and there I would like to keep it more simple and don’t use avatars. Is this possible?

Thanks. Keep up the great work!
Bela

Implement converter for video and audio blocks

Here is one of the lines that didn't render properly in epub3:

.Video: random walk
video::random2a.m4v[width=400, align=center]

This is from 01.ad in the processing-book repo. The video does render properly with asciidoctor 1.5. I used iBooks as the epub3 reader. Everything (text, images) looked OK with except the video.

Document how to specify custom styles

Document how to change the styling with a custom stylesheet.

Changing the style and layout of the EPUB output is as simple as customizing the stylesheet. In fact, an EPUB is really just a webpage. Copy the the CSS from this repository into a local directory (e.g., epub3-styles) and pass the following flag:

-a epub3-stylesdir=epub3-styles

By default it will look for the following two files:

  • epub3.css
  • epub3-css3-only.css

The second file can be empty, but gives you the opportunity to add styles that are only understood by CSS3-compliant readers (anything based on Webkit).

Converter crashes if safe mode is >= server

The EPUB3 converter crashes if the safe mode is >= server because it cannot resolve the 'docdir' attribute to a directory (because it's empty).

lib/asciidoctor-epub3/packager.rb:180:in `add_profile_images'

kf8 Export has a problem with images

Every time I try to convert an AsciiDoc document to mobi I get the following error:

Warnung(prcgen):W14010: Mediendatei nicht gefunden   /var/folders/3g/f_fnqw5x7gn6b7nvvky8rbhh0000gn/T/mobi-vYctXi/OEBPS/images/screenshots/chapter05/products_index.jpg

Converting the same document to HTML with asciidoctor works fine.

Suggested edit for the documentation of asciidoctor-epub3

https://github.com/asciidoctor/asciidoctor-epub3 says
«Converting an AsciiDoc document to EPUB3 is as simple as passing your document to the asciidoctor-epub3 command.»

So I thought converting our group's Christmas Newsletter (currently an AsciiDoc document for pdf) to EPUB3 should be simple.
It turned out to be not quite as simple as that.
Here is what I had to do;

  • Get a more recent version of ruby (I'm running Ubuntu 12.04)
    $ sudo apt-get install python-software-properties
    $ sudo apt-add-repository ppa:brightbox/ruby-ng
    $ sudo apt-get update
    $ sudo apt-get install ruby1.9.3

(With thanks to https://www.brightbox.com/docs/ruby/ubuntu/)

  • Make a new directory
    $ mkdir asciidoctor-epub3
  • Get asciidoctor-epub3 from git
    $ git clone https://github.com/asciidoctor/asciidoctor-epub3
  • Install extra requirements
    $ sudo apt-get install rubygems ruby-dev
    $ sudo gem1.9.3 install gepub
    $ sudo gem1.9.3 install thread_safe
  • Edit file ./asciidoctor-epub3/lib/asciidoctor-epub3.rb, adding full paths; so that it reads
    require '/var/lib/gems/1.8/gems/asciidoctor-1.5.2/lib/asciidoctor'
    require '/var/lib/gems/1.8/gems/asciidoctor-1.5.2/lib/asciidoctor/extensions'
    require '/var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub.rb'
    require_relative 'asciidoctor-epub3/converter'
    require_relative 'asciidoctor-epub3/packager'
  • Edit the original asciidoc file, making each section of the original into its own standalone asciidoc file
    («chapterOne.asciidoc», «chapterTwo.asciidoc» ...)
  • Make a parent asciidoc file «ChristmasNewsletter.adoc» to include those chapters, thus ...
    ...
    include::/path/to/chapterOne.asciidoc[]

    include::/path/to/chapterTwo.asciidoc[]

    include::/path/to/chapterThree.asciidoc[]
    ...
  • And now this works:-
    bin/asciidoctor-epub3 -D output data/samples/ChristmasNewsletter.adoc

I suggest that a help file with the above information would be a big time-saver for people like me

 Richard H

Table of Contents renders as Untitled in eBook readers other than iBooks

In iBooks, the .epub file generated works great, looks great and the ToC shows up as expected. However, when using other readers, all the chapter titles render as "Untitled". I've tried Clearview:

clearview

And Calibre:

calibre

And Kibatu:

kibatu

In Kibatu, images don't render either. The following error pops up.

kibatu-images

xrefs between chapters (was: links between sections)

It looks like the links using <<_my_chapter, My Chapter>> are broken.
I'm not really sure about what's happening because it looks like the link is generated <a href="_my_chapter">My Chapter</a>.
But as I am in a multi document .adoc, using several includes, the link should maybe be of the form <a href="document-17755860.xhtml">My Chapter</a>, as they are in the TOC ?

Maybe related to #19

Clean auto-generated file names for chapters

The auto-generated file names aren't being cleaned. For instance, if there's a single quote in the chapter title, then a single quote ends up in the file name. If a smart quote is in the title, things get even worse because the entry also doesn't display properly in the TOC (the entity is shown instead).

Problem installing from git

Hi,
I'm getting the following error:
gem install pkg/asciidoctor-epub3-1.5.0.dev.gem
ERROR: While executing gem ... (Gem::Package::PathError)
installing into parent path /home/mathieu/.gem/ruby/2.3.0/README.adoc of /home/mathieu/.gem/ruby/2.3.0/gems/asciidoctor-epub3-1.5.0.dev is not allowed

attributes ignored

If you set and attribute like this:

:appversion: 1.0.0
The current version of the application is {appversion}.

in rendered .epub output the attribute is ignored:

The current version of the application is {appversion}.

instead of the expected:

The current version of the application is 1.0.0.

Inline images are not included

Source:

image::red.png[]

A

image:blue.png[] B

Z

Resulting .epub does not have blue.png file, but it is referenced in the document.

Single monospaced words can get hyphenated in EPUB3

Consider the following paragraph

xxx xx xxx xxxxxx xxx xxxx xx xxxxxxx xxxxxxxx xx xx xxxxxxxx xx xxxxx xxxxxxx xx xxxxx xxx xxxxxxxxxx xxxxxx xxxxxxxx
xxx xxxxxxx xxx xxxx xxxxxxxx xxxxxx xxx xxxxxxxxxxxx xxxxxxxx xxxx xxx xxxxxx xxx xxxxxx xxxx xxx xxx xxxxxxxx xx xxxxxx
xx xx xxxxxx xxxxxxx xxxx xxxxxxxxxxx xxxx xx `@CompileStatic` xxx xx xxxx xxx xxxxxxx xxxxxxxxxxx xxxxxxxxxxxx xxx
xxxxxx xxxx xxxxxxxx.

If this is rendered in epub3, the @CompileStatic might show up as @CompileSt- atic (broken over two lines)

Seen with alpha 3.

Disable text-rendering for Kindle devices

Currently, text-rendering is specified as follows for Kindle devices:

text-rendering: optimizeLegibility;

This is the old school way of enabling font kerning. Unfortunately, certain Kindle devices (including the online previewer and the Kindle Voyage mode in the Kindle Previewer) fail to properly display text as a result of this setting. It is reported the the setting also prevents mobi files from being published to Amazon.

We have no choice but to give up on trying to control font kerning on Kindle devices.

Image location for built-in avatar

When setting the header :imagesdir: to anything else than 'images', or commenting this header, the built in avatar is not found, while pictures are archived properly.

ERROR: […]/epub/test.epub/OEBPS/test.xhtml(24,58): 'OEBPS/images/avatars/default.jpg': referenced resource missing in the package.

CLI should identify as asciidoctor-epub3

The CLI should identify as asciidoctor-epub3 and output the version of Asciidoctor EPUB3 in the usage message. For example:

$ asciidoctor-epub3 -v
Asciidoctor EPUB3 1.5.0.dev using Asciidoctor 1.5.2 [http://asciidoctor.org]
...

Use the Asciidoctor PDF CLI as a reference.

Download Kindlegen if it can't be found

If Kindlegen can't be found (because the gem wasn't install or we can't install gems like in AsciidoctorJ), then download Kindlegen on demand, extract it to a temporary location and use that executable. This will allow mobi generation to work consistently everywhere and will give us control over the Kindlegen download.

Formatting in section titles cause a crash

If the source document contains formatting in chapter or section titles, then asciidoctor-epub3 crashes:

$ cat bug.adoc
= Asciidoctor EPUB3: Sample Book
Author Name
v1.0, 2014-04-15

== Hello *World*

How do you do
$                   
$ asciidoctor-epub3 --trace bug.adoc                   
/var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/converter.rb:30:in `convert': undefined method `references' for #<Asciidoctor::Inline:0x8487940> (NoMethodError)
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/inline.rb:37:in `convert'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:1178:in `convert_quoted_text'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:381:in `block (2 levels) in sub_quotes'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:381:in `gsub!'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:381:in `block in sub_quotes'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:380:in `each'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:380:in `sub_quotes'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:112:in `block in apply_subs'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:107:in `each'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:107:in `apply_subs'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/substitutors.rb:149:in `apply_title_subs'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/abstract_block.rb:127:in `title'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/section.rb:92:in `generate_id'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:1599:in `initialize_section'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:248:in `next_section'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:291:in `next_section'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:52:in `parse'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/document.rb:448:in `parse'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor.rb:1337:in `load'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor.rb:1415:in `convert'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/cli/invoker.rb:93:in `block in invoke!'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/cli/invoker.rb:85:in `each'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/cli/invoker.rb:85:in `invoke!'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/bin/asciidoctor-epub3:13:in `<top (required)>'
    from /usr/local/bin/asciidoctor-epub3:23:in `load'
    from /usr/local/bin/asciidoctor-epub3:23:in `<main>'

Should horizontal rules work?

Currently (alpha3) using the ''' (3-apostrophe) markup does not generate a line in epub3. Is this intentional or 'not implemented yet' ?

Invalid warnings for section titles out of sequence

I have an Asciidoctor setup producing HTML, EPUB3 and PDF output via Maven. Both HTML and PDF work flawlessly. However, the EPUB3 output spits out warnings about allegedly out of sequence section titles:

[INFO] --- asciidoctor-maven-plugin:1.5.3:process-asciidoc (html) @ spring-data-commons ---
[INFO] Rendered /Users/olivergierke/Documents/workspace/spring-data-commons/src/main/asciidoc/index.adoc
[INFO] 
[INFO] --- asciidoctor-maven-plugin:1.5.3:process-asciidoc (epub) @ spring-data-commons ---
asciidoctor: WARNING: dependencies.adoc: line 49: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: dependencies.adoc: line 54: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 16: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 104: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 181: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 215: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 398: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 481: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repositories.adoc: line 631: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: auditing.adoc: line 5: section title out of sequence: expected level 1, got level 2
asciidoctor: ERROR: index.adoc: line 26: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: WARNING: repository-namespace-reference.adoc: line 6: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repository-populator-namespace-reference.adoc: line 6: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repository-query-keywords-reference.adoc: line 5: section title out of sequence: expected level 1, got level 2
asciidoctor: WARNING: repository-query-return-types-reference.adoc: line 5: section title out of sequence: expected level 1, got level 2
asciidoctor: ERROR: index.adoc: line 35: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
[INFO] Rendered /Users/olivergierke/Documents/workspace/spring-data-commons/src/main/asciidoc/index.adoc
[INFO] 
[INFO] --- asciidoctor-maven-plugin:1.5.3:process-asciidoc (pdf) @ spring-data-commons ---
[INFO] Rendered /Users/olivergierke/Documents/workspace/spring-data-commons/src/main/asciidoc/index.adoc

Steps to reproduce:

  1. git clone https://github.com/spring-projects/spring-data-commons
  2. cd spring-data-commons
  3. mvn clean generate-resources -Pdistribute

Versions in use:

  • Asciidoctor Maven plugin 1.5.3
  • AsciidoctorJ PDF 1.5.0-alpha.11
  • AsciidoctorJ EPUB3 1.5.0-alpha.6

how this happened

C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1 .5.0.dev/bin/../lib/asciidoctor-epub3 (LoadError) from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.dev/bin/asciidoctor-epub3:3:in <top (required)>' from C:/Ruby21-x64/bin/asciidoctor-epub3:23:inload'
from C:/Ruby21-x64/bin/asciidoctor-epub3:23:in `

'

Failed to parse source, undefined method `convert' for nil:NilClass (NoMethodError)

H:\projects> gem install asciidoctor
Fetching: asciidoctor-1.5.2.gem (100%)
Successfully installed asciidoctor-1.5.2
Parsing documentation for asciidoctor-1.5.2
Installing ri documentation for asciidoctor-1.5.2
Done installing documentation for asciidoctor after 4 seconds
1 gem installed

H:\projects>asciidoctor -V
Asciidoctor 1.5.2 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:- ex:IBM437)

H:\projects>git clone https://github.com/elastic/elasticsearch-definitive-guide.git
Cloning into 'elasticsearch-definitive-guide'...
remote: Counting objects: 10609, done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 10609 (delta 36), reused 0 (delta 0), pack-reused 10535R
Receiving objects: 100% (10609/10609), 6.82 MiB | 3.14 MiB/s, done.
Resolving deltas: 100% (7800/7800), done.
Checking connectivity... done.

H:\projects>cd elasticsearch-definitive-guide

H:\projects\elasticsearch-definitive-guide>asciidoctor -trace -b epub -d book book.asciidoc
asciidoctor: FAILED: 'ace' could not be loaded
Use --trace for backtrace

H:\projects\elasticsearch-definitive-guide>asciidoctor --trace -b epub -d book book.asciidoc
h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1362:in rescue in load': asciidoctor: FAILED: H:/projects/elasticsearch-definitive-guide/book.asciidoc: Failed to parse source, undefined methodconvert' for nil:NilClass (NoMethodError)
from h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1281:in load' from h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1458:inconvert'
from h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in block in invoke!' from h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:ineach'
from h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in invoke!' from h:/p/Ruby22-x64/lib/ruby/gems/2.2.0/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in<top (required)>'
from h:/p/Ruby22-x64/bin/asciidoctor:23:in load' from h:/p/Ruby22-x64/bin/asciidoctor:23:in

'

Can't generate epub: undefined method `to_ios'

I have a pretty simple adoc file and asciidoctor 1.5.2. Tried to generate epub and got this:

$ asciidoctor-epub3 joiningCTOschool.adoc
undefined method `to_ios' for #Asciidoctor::Epub3::Packager:0x007faf990a79e0
Use --trace for backtrace

Running with --trace produced this:

Yakov:ctoschool yfain11$ asciidoctor-epub3 --trace joiningCTOschool.adoc
/Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:303:in postprocess_xhtml': undefined methodto_ios' for #Asciidoctor::Epub3::Packager:0x007f99db82d288 (NoMethodError)
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:250:in block (3 levels) in add_content' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:248:ineach'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:248:in each_with_index' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:248:inblock (2 levels) in add_content'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:in instance_eval' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:inblock in ordered'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/package.rb:166:in ordered' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/book.rb:205:inordered'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:39:in ordered' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:245:inblock in add_content'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in instance_eval' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:ininitialize'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in new' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:inresources'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:240:in add_content' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:422:inblock in package'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in instance_eval' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:ininitialize'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:340:in new' from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:340:inpackage'
from /Users/yfain11/asciidoctor-epub3/lib/asciidoctor-epub3/converter.rb:37:in write' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1051:inwrite'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1504:in convert' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:inblock in invoke!'
from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in each' from /Users/yfain11/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:ininvoke!'
from /Users/yfain11/asciidoctor-epub3/bin/asciidoctor-epub3:13:in `

'

:front-cover-image: 'inline image macro'

The header :front-cover-image: accepts the image macro only if with one colon separate the path from the macro command

:front-cover-image: image:cover.jpg[]

else asciidoctor-epub3 fails to run:

:front-cover-image: image::cover.jpg[]
/Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/item.rb:117:in `initialize': No such file or directory - images/:cover.jpg (Errno::ENOENT)
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/item.rb:117:in `new'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/item.rb:117:in `add_content'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/book.rb:180:in `add_item'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:211:in `create_one_file'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:51:in `file'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:133:in `cover_image'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:74:in `block in add_cover_image'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in `instance_eval'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in `initialize'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in `new'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in `resources'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:73:in `add_cover_image'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:403:in `block in package'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in `instance_eval'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in `initialize'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:325:in `new'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:325:in `package'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/converter.rb:825:in `convert_file'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/gems/asciidoctor-epub3-1.0.0.dev/bin/asciidoctor-epub3:49:in `<top (required)>'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/bin/asciidoctor-epub3:23:in `load'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/bin/asciidoctor-epub3:23:in `<main>'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/bin/ruby_executable_hooks:15:in `eval'
    from /Users/ryuutei/.rvm/gems/ruby-2.1.2@asciidoctor-epub3/bin/ruby_executable_hooks:15:in `<main>'

shell returned 1

And thanks for this great software.

Error >> no epub file produced

With the hml backend, asciidoctor gives a warning, proceeds, and produces an html file. For epub3: same badness in the source is fatal:no epub produced:

$ asciidoctor-epub3 manuscript.adoc 
asciidoctor: WARNING: manuscript.adoc: line 2155: invalid style for paragraph: Catching wild elephants in Burma - photo
undefined method `to_ios' for #<Asciidoctor::Epub3::Packager:0x007fd8333ca880>
  Use --trace for backtrace
$ re
total 792
-rw-r--r--   1 carlson  staff  394231 Feb 22 21:41 manuscript.adoc
drwxr-xr-x  37 carlson  staff    1258 Feb 22 21:41 images
drwxr-xr-x  92 carlson  staff    3128 Feb 22 21:41 text
-rw-r--r--   1 carlson  staff    3830 Feb 22 21:41 image_manifest.ad
-rw-r--r--   1 carlson  staff    4081 Feb 22 21:41 manifest.ad
$ 
$ asciidoctor-epub3 manuscript.adoc --trace
asciidoctor: WARNING: manuscript.adoc: line 2155: invalid style for paragraph: Catching wild elephants in Burma - photo
/Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:303:in `postprocess_xhtml': undefined method `to_ios' for #<Asciidoctor::Epub3::Packager:0x007fc2f458aa48> (NoMethodError)
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:250:in `block (3 levels) in add_content'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:248:in `each'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:248:in `each_with_index'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:248:in `block (2 levels) in add_content'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:in `instance_eval'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:in `block in ordered'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/package.rb:166:in `ordered'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/book.rb:205:in `ordered'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:39:in `ordered'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:245:in `block in add_content'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in `instance_eval'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in `initialize'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in `new'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in `resources'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:240:in `add_content'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:422:in `block in package'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in `instance_eval'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in `initialize'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:340:in `new'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/packager.rb:340:in `package'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/lib/asciidoctor-epub3/converter.rb:37:in `write'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1051:in `write'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1504:in `convert'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
    from /Users/carlson/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.alpha.4/bin/asciidoctor-epub3:13:in `<top (required)>'
    from /Users/carlson/.rbenv/versions/2.1.2/bin/asciidoctor-epub3:23:in `load'
    from /Users/carlson/.rbenv/versions/2.1.2/bin/asciidoctor-epub3:23:in `<main>'

Should sections be numbered?

Consider the following snippets:

Toplevel.adoc

[chapter]
= Chapter title

include ::FileBeingIncluded.adoc[]

FileBeingIncluded.adoc

:numbered:
== Section title
:!numbered:

In html5 backend this will actually cause level 2 to be numbered. In epub3 is does not.

package undefined method split

First off, pretty amazing feature - having a full ebook publishing toolchain just using asciidoc is going to be amazing.

I tried the epub generator and it seem to work great - but found this little issue trying to run it against some random files (including the .adoc files found inside the project itself)

➜ asciidoctor-epub3 git:(master) asciidoctor-epub3 LICENSE.adoc (master⚡)
/Users/max/code/asciidoctor-epub3/lib/asciidoctor-epub3/packager.rb:238:in package': undefined methodsplit' for nil:NilClass (NoMethodError)
from /Users/max/code/asciidoctor-epub3/lib/asciidoctor-epub3/converter.rb:821:in convert_file' from /Users/max/code/asciidoctor-epub3/bin/asciidoctor-epub3:49:in<top (required)>'
from /Users/max/.rvm/gems/ruby-1.9.3-p484@asciidoctor-epub3/bin/asciidoctor-epub3:23:in load' from /Users/max/.rvm/gems/ruby-1.9.3-p484@asciidoctor-epub3/bin/asciidoctor-epub3:23:in

'
from /Users/max/.rvm/gems/ruby-1.9.3-p484@asciidoctor-epub3/bin/ruby_executable_hooks:15:in eval' from /Users/max/.rvm/gems/ruby-1.9.3-p484@asciidoctor-epub3/bin/ruby_executable_hooks:15:in'

no mobi file generated

When trying to generate a MOBI file out of the sample book using
"asciidoctor-epub3 -D output -a ebook-format=kf8 sample-book.adoc",
only an epub file called "sample-book-kf8.epub" is generated.

The terminal output says
"Wrote MOBI to [...]/output/sample-book.mobi"
but this file is never generated.

Using: Asciidoctor 1.5.0, Ruby 1.9.3 and a freshly installed asciidoctor-epub3

Allow overriding chapter header look-and-feel

I'd like change the chapter headers to use a bold font and a white background, instead of a dark background with white text. I'd also like to remove the icon and author name.

Is this possible?

If not, why is the current look-and-feel recommended?

Configurable syntax highlighting

First of all, thank you very much for this module. It's working quite well for my needs, except a tiny thing that I can't figure : syntax highlight.

Is there something to do to enable it? It's working for my html and pdf output but not for the epub one.

:source-highlighter: coderay

Fails during generation with "undefined method `to_ios'"

I've got asciidoctor-epub3 crashing during epub generation on a document that I'm working on. I've been able to reproduce the same crash using the following minimal test case.

$ cat bug.adoc
= Asciidoctor EPUB3: Sample Book
Author Name
v1.0, 2014-04-15

== Hello World

How do you do
$
$ asciidoctor-epub3 bug.adoc
undefined method `to_ios' for #<Asciidoctor::Epub3::Packager:0x9d68f68>
Use --trace for backtrace

Full trace

$ asciidoctor-epub3 --trace bug.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:288:in `postprocess_xhtml': undefined method `to_ios' for #<Asciidoctor::Epub3::Packager:0x8770044> (NoMethodError)
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:235:in `block (3 levels) in add_content'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:233:in `each'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:233:in `each_with_index'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:233:in `block (2 levels) in add_content'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:40:in `block in ordered'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/package.rb:166:in `ordered'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/book.rb:205:in `ordered'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:39:in `ordered'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:230:in `block in add_content'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/resource_builder.rb:33:in `initialize'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in `new'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:292:in `resources'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:225:in `add_content'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:407:in `block in package'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/gepub-0.6.9.2/lib/gepub/builder.rb:185:in `initialize'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:325:in `new'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/packager.rb:325:in `package'
    from /var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.0.0.dev/lib/asciidoctor-epub3/converter.rb:36:in `write'
    from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.0/lib/asciidoctor/document.rb:1033:in `write'

It isn't really clear to me what is triggering this bug. Strangely enough, in my actual document, the bug is triggered in only one scenario. I've got a master.adoc within which I include a.adoc, b.adoc, etc. Running asciidoctor-epub3 on master.adoc works fine. But if I don't include the files and instead concatenate master.adoc, a.adoc, b.adoc and feed the resulting file to asciidoctor-epub3, then this crash happens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.