Closed Alwinator closed 2 years ago
Could you give this a try instead blockdiag::test.diag[format=png]
? The difference between the two is that in your example the diagram processor uses the directory containing test.adoc
as base directory while in my suggestion the base directory containing test.diag
should get used.
@pepijnve Thank you for your comment. Unfortunately, I have the same problem with blockdiag::test.diag[format=png]
. (All three files (.adoc, .diag, .png) are in the same directory.)
I tried to reproduce what you're seeing locally, but no success so far I'm afraid. blockdiag test.diag
and running through asciidoctor result in the same image here.
I think this has to do with the current directory of the blockdiag subprocess not being set at all. As a consequence the resolution of the image path will start from the current directory of the shell from which asciidoctor is being run. Could that explain the difference we're seeing?
@pepijnve Sorry for the long delay. I was finally able to reproduce the bug in a new environment. I have used Docker to make sure that it also works on your machine. You can find the code here: https://github.com/Alwinator/asciidoctor-diagram-image-bug I also think that it is a directory problem, but I haven't found it yet.
@pepijnve Were you able to reproduce the bug on your computer using the Docker image?
I haven't had a chance to try yet. Paid work is keeping me occupied.
@pepijnve That's okay! Just tell me when you reviewed it.
It was a path issue, I've fixed it by setting the :outdir:
parameter in addition to the :imagesdir:
.
I want to use a diagram that includes an image inside of my asciidoctor document. However, the image inside of the diagram does not render in the document. When I directly build the diagram using the
blockdiag
command it works.It also does not work with graphviz diagrams. I have this problem both when creating HTML and PDF.
test.diag
Output of the
blockdiag test.diag
command:test.adoc
The image rendered from asciidoctor: