Hierarchical documents

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hierarchical documents

metro
I am trying to implement a reuse flow where document A can include parts of document B, say B1.

Document B builds fine standalone, but when including B1 into document A, parts included in B1 are no longer found.

This is essentially the problem reported in 650.

I don't use imagedir, but always use full path relative to the current document. A simple way to solve the problem above, is to provide the path of the current adoc file and use it in the include statement.

Is there a way to make the path of a file available to the adoc file for use?

Even better would be full support for subdocuments. Issue 650 seems to have gone quiet. Is there a plan to improve subdocument support?

Thanks,

MT
--
Reply | Threaded
Open this post in threaded view
|

Re: Hierarchical documents

mojavelinux
Administrator

On Thu, May 28, 2015 at 7:24 PM, metro [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Even better would be full support for subdocuments. Issue 650 seems to have gone quiet. Is there a plan to improve subdocument support?

Quiet, but not forgotten. I still plan on having an implementation (at least in preview) for 1.6.0.

Until then, I recommend implementing it as a custom block macro. That will give you more flexibility than the include statement.

Another solution is a custom IncludeProcessor that sets document-level attributes above an below the content, similar to how the leveloffset works. See https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/reader.rb#L1039-L1050.

Cheers,