On 10/10/12 06:34, Jens Getreu wrote:
> I observed the following behavior:
> 
>  1. Without :data-uri: directive: Paths in subdocuments to images are
>     relative to the location of the main document.
>  2. With :data-uri: Paths in subdocuments to images are relative to the
>     location of the subdocument.
> 
> I usually use the 2. because my subdocuments are independent projects
> with separate resources. Unfortunately not all backends implement the 2.
> correctly yet.
> For example the html4 and odt backends do not therefore my projects do
> not compile with these backends.
> 
> The :data-uri: directive is meant to embed media HTML5. So the described
> behavior is just a side effect? Is it possible to control how paths are
> interpreted by other means then :data-uri: ?
> 
> If not, there should be a directive doing so.

A work-around is to use the {@::} conditional attribute to substitute
one path if indir == docdir (i.e. is root document) or another path if
not (i.e. is an included sub-document) e.g.

image::{indir@{docdir}::doc/}picture.png[]

The src is picture.png if root document else doc/picture.png if included.


Cheers, Stuart


> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "asciidoc" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/asciidoc/-/uIpKdckPkwYJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to