-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline images are not included #30
Comments
If I remember correctly, this is a known limitation because the AST does not return inline images. See https://github.com/asciidoctor/asciidoctor-epub3/blob/master/lib/asciidoctor-epub3/packager.rb#L331 As long as that line gathers all the images, they will get packaged. However, we may need a change to core to expose this metadata. |
So the issue is that inline images are The world of Ruby is alien to me, even if I manage to do that, I'll never handle doing tests properly. |
Unfortunately not. That gets to the heart of the problem. Inline syntax is not parsed during the parse phase. Inline syntax is discovered and converted in a streaming method. The only way to know about the inline images is to enable the What I probably need to do is add the images to the archive after adding the content. That way, the documents will already be converted and therefore should have a reference to the images. I would switch from looking for images using |
There is one workaround you can use. You can create a front-matter.html file and add all the inline images inside a comment block (or hidden element). The converter will add these images to the archive. (See https://github.com/asciidoctor/asciidoctor-epub3/blob/v1.5.0.alpha.6/lib/asciidoctor-epub3/packager.rb#L159-L167). The downside is that you will get a blank page in the EPUB3 file, though you could put something on this page just so it isn't blank. |
Solving this issue requires a rather deep understanding of how a) the EPUB3 packager works and b) how Asciidoctor manages images using |
This is really tough. |
Actually, it's not that tough now that we have performed processing of an inline macro in the mathematical extension. We either need to use a Treeprocessor or we can look at the image catalog after conversion. We may need to monkeypatch core in order to close some gaps, but it's definitely doable. |
Agh. This bug is biting me HARD. Sorry because I know it is a difficult task, but any progress on that? I am using asciidoctor-mathematical for some formulas, and that's the last thing I need to render a proper epub. |
Any progress on that? I can't export my project to EPUB. Also the
|
…packaging resolves asciidoctor#30 inline images are not included resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#22 `Image not found or not readable` if `imagesdir` is not in the current directory resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
…packaging resolves asciidoctor#169 images in tables don't show up resolves asciidoctor#190 plantumlconfig is looking in the wrong dir resolves asciidoctor#30 Inline images are not included
We now *do* package inline images, thanks to #283
Source:
Resulting .epub does not have
blue.png
file, but it is referenced in the document.The text was updated successfully, but these errors were encountered: