Generated images of asciidoctor-diagramm not found any more

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Generated images of asciidoctor-diagramm not found any more

wimalopaan
I recently updated asciidoctor to 1.5.6.1. and asciidoctor-diagram-1.5.5.

Now I ran into troubles: all generated images are placed in directories above to actual document location:

e.g. if the source resides in:

<d>/doc/abc.adoc

the images are generated in:

<d>/abc.html/image1.svg

an asciidoctor itself reports an error because the generated image isn't found.

Before I upgraded the images were generated in the document directory.

Any hints?

--
 Wilhelm
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Generated images of asciidoctor-diagramm not found any more

mojavelinux
Administrator
Hmm. This is not the behavior I'm observing. Could you be more specific about how you are invoking Asciidoctor and what parameters you are passing to it?

Thanks!

-Dan

On Thu, Jul 27, 2017 at 3:19 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I recently updated asciidoctor to 1.5.6.1. and asciidoctor-diagram-1.5.5.

Now I ran into troubles: all generated images are placed in directories above to actual document location:

e.g. if the source resides in:

<d>/doc/abc.adoc

the images are generated in:

<d>/abc.html/image1.svg

an asciidoctor itself reports an error because the generated image isn't found.

Before I upgraded the images were generated in the document directory.

Any hints?

--
 Wilhelm



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generated-images-of-asciidoctor-diagramm-not-found-any-more-tp5759.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Generated images of asciidoctor-diagramm not found any more

wimalopaan
It boils down to the use of

-a data.uri

Using data-uri triggers the error.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Generated images of asciidoctor-diagramm not found any more

mojavelinux
Administrator
When you use data-uri, you need to set the attributes to different values. This seems to be true for any version of Asciidoctor core or Asciidoctor Diagram I try.

Let's assume I'm generating a document from the docs directory to the build directory, running the command from the project root.

I use:

asciidoctor -r asciidoctor-diagram -D build -a imagesdir=`pwd`/build docs/sample.adoc

The images get generated into the build directory and, thanks to the imagesdir attribute, data-uri can resolve the images at that location when embedding them into the document.

If you have a more specific example you can share, preferably with a sample project, I can provide more specific instructions.

-Dan

This is related to the following discussion:


(the behavior of data-uri and Asciidoctor PDF is parallel)


On Fri, Jul 28, 2017 at 4:32 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
It boils down to the use of

-a data.uri

Using data-uri triggers the error.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generated-images-of-asciidoctor-diagramm-not-found-any-more-tp5759p5761.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Generated images of asciidoctor-diagramm not found any more

wimalopaan
Thank you for your help!

Setting imagesdir to the appropriate directory (in my case the document source dir) solves the problem. Thanks!

I'm pretty sure that I did not change any settings in my Makefile or in the documents themselves. But at some past point in time the default behaviour must have changed. But I'm unable to tell you, exactly when ... sorry.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Generated images of asciidoctor-diagramm not found any more

mojavelinux
Administrator
You're correct that at some point the behavior changed, probably around the time that Asciidoctor Diagram implemented tracking of the output file. Although you observed a single directory difference, I think that was just coincidence. The diagrams track the location of the output file now, and imagesdir must be adjusted to follow that. Of course, that's highly dependent on what type of output you are creating (embedded or not).

Cheers,

-Dan

On Sat, Jul 29, 2017 at 10:18 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thank you for your help!

Setting imagesdir to the appropriate directory (in my case the document source dir) solves the problem. Thanks!

I'm pretty sure that I did not change any settings in my Makefile or in the documents themselves. But at some past point in time the default behaviour must have changed. But I'm unable to tell you, exactly when ... sorry.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Generated-images-of-asciidoctor-diagramm-not-found-any-more-tp5759p5769.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Loading...