Posted by
siddjain on
Aug 19, 2020; 9:26pm
URL: https://discuss.asciidoctor.org/Strange-issues-with-asciidoc-imagesdir-stops-working-tp8194.html
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?