Hello Stuart,
Am Montag, 14. Januar 2013 06:14:55 UTC+1 schrieb Stuart Rackham:
>
>
> I can't see a straight-forward way to implement this: I made an attempt
> by calculating {docpath} (the relative path between the root document
> and the included document), but what do we do about shared images e.g.
> admonition icons, does each sub-document have it's own separate copy?
>
> Yes, this is how I use subdocuments for chapters, exercises etc..
But I understand, that you do not want to break existing documents.
****
Suggestion:
lets say we have the following subdocument:
chapter1/contents.asciidoc
1) example of a path starting from the root document:
image::images/image1.png[]
2) example notation of a paths starting from the subdocument:
image::*=*/../images/image1.png[]
****
Explanation:
1) is the standard documented notation everybody uses (except for
:data-uri: documents, there it is different)
2) the *=* symbol means "relative to *this* subdocument".
We compute the shortest path between "outdir" and "indir" and prepend this
path to 2). In some
cases it is even possible the shorten the composed result again.
Cheers
Jens
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.