Strange issues with asciidoc imagesdir stops working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange issues with asciidoc imagesdir stops working

siddjain
I have following top-level adoc file in which i include multiple child adoc files.

include::chap01.adoc[]

include::chap02.adoc[]

include::chap03.adoc[]

and so on

each chapter has a preamble like following. following is preamble for chap04.adoc

include::common-settings.adoc[]
:imagesdir: ../images/chapter04

when i ran asciidoctor on my top level file i got following warnings:

bash-5.0# ./run-asciidoc.sh phf.adoc
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/stem-359f1a045d7f997bae36574e448f2c64.png
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/stem-f50853d41be7d55874e952eb0d80c53e.png
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/equation1.png
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/stem-359f1a045d7f997bae36574e448f2c64.png

it is true that these images are not there in /documents/images/chapter04. instead asciidoc generated them in the directory from where i ran it.

bash-5.0# pwd
/documents/manuscript
bash-5.0# ls equation1.png
equation1.png

this looks like a bug in asciidoc. i am using

bash-5.0# asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

Also when i convert chap04.adoc in solo, it passes without warning

bash-5.0# ./run-asciidoc.sh chap04.adoc

i would have expected same problem to occur but it doesn't. what is going on here?
Reply | Threaded
Open this post in threaded view
|

Re: Strange issues with asciidoc imagesdir stops working

mojavelinux
Administrator
Quite simply, the imagesdir was not designed to be changed. It works in certain scenarios, but breaks down in others. So caveat emptor.

It also seems you have asciidoctor-mathematical involved here, which may not honor the same rules as Asciidoctor PDF. I would first try without the STEM equations to make sure images work in your set up in general. And if it's only the STEM equations that are causing the problem, then the issue is in asciidoctor-mathematical.

Best Regards,

-Dan

On Wed, Aug 19, 2020 at 3:26 PM siddjain [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have following top-level adoc file in which i include multiple child adoc files.

include::chap01.adoc[]

include::chap02.adoc[]

include::chap03.adoc[]

and so on

each chapter has a preamble like following. following is preamble for chap04.adoc

include::common-settings.adoc[]
:imagesdir: ../images/chapter04

when i ran asciidoctor on my top level file i got following warnings:

bash-5.0# ./run-asciidoc.sh phf.adoc
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/stem-359f1a045d7f997bae36574e448f2c64.png
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/stem-f50853d41be7d55874e952eb0d80c53e.png
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/equation1.png
asciidoctor: WARNING: image to embed not found or not readable: /documents/images/chapter04/stem-359f1a045d7f997bae36574e448f2c64.png

it is true that these images are not there in /documents/images/chapter04. instead asciidoc generated them in the directory from where i ran it.

bash-5.0# pwd
/documents/manuscript
bash-5.0# ls equation1.png
equation1.png

this looks like a bug in asciidoc. i am using

bash-5.0# asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

Also when i convert chap04.adoc in solo, it passes without warning

bash-5.0# ./run-asciidoc.sh chap04.adoc

i would have expected same problem to occur but it doesn't. what is going on here?


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Strange-issues-with-asciidoc-imagesdir-stops-working-tp8194.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux