I am building my asciidoc template to manage my development documentations. Therefor I want to be able to link existing ascii documents into a main / or a new document inclusive images and other resources. To link documents I use the include keyword that works to reference documents into a new one.
Problem
My Problem is, that the images of the included / referenced document are not shown. I am aware that the path resolution for the image starts from the main document and does not match with the path from the included / referenced document images. The image paths in the included document are correct. The images are shown when generating only the included document. Does anyone have a good solution to solve that?
Example of the not working document include with images
1. Directory structure of the documents.
main.adoc includes Risikoanalyse_v2.adoc that contains the images
- ./main.adoc
- ./Risikoanalysen/Risikoanalyse_v2.adoc
- ./Risikoanalysen/Risikodiagramm_1_v2.png
- ./Risikoanalysen/Risikodiagramm_2_v2.png
2. Content of the main.adoc document
== Content 1
ratatata
include::./Risikoanalysen/Risikoanalyse_v2.adoc[]
3. Content of the Risikoanalyse_v2.adoc
= Risikoanalyse
Inhaltsverzeichnis
:doctype: book
:toc: left
:toclevels: 4
:sectnums:
:version: Version 2.0, 03.03.2019
{version}
<<<
== Risiken
bachelor party
image::Risikodiagramm_1_v2.png[Risikodiagramm,300,align="center"] // image that is not resolved
<<<
== preventive Gegenmassnahmen
rooftop party
image::Risikodiagramm_2_v2.png[Risikodiagramm,300,align="center"] // image that is not resolved
4. Command to generate the documents
- asciidoctor main.doc*
- asciidoctor-pdf main.doc