Multi-Multi-file Documents

Otto Smittenaar's Avatar

Otto Smittenaar

12 Apr, 2016 09:29 AM

I assumed that every external file tag would be processed also when it exists in a document that's already included via a external file tag. I tested this with both tag options and it did not work:

<<[sections/section1.md]
{{filename}}

Do you have a solution for this?

Best regards,
Otto

  1. Support Staff 1 Posted by Brett on 12 Apr, 2016 02:22 PM

    Brett's Avatar

    You can nest includes, but note that all paths are relative to the base
    document, not the included document. If the base document includes
    "sections/section1.md" and then section1.md wants to include a subfolder
    "subsections/subsection1.md", it would have to use:

    <<[sections/subsections/subsection1.md]

    Because all of the included documents have to be collated before
    rendering in order to process things like footnotes, referenced links,
    etc., by the time the include statement is processed, nested includes
    don't know always know where they came from in a folder hierarchy.

    -Brett

  2. 2 Posted by Otto Smittenaar on 15 Apr, 2016 09:53 AM

    Otto Smittenaar's Avatar

    Hi Brett,

    Thank you for the quick reply. I totally forgot about this. You are right. It works perfectly.

    Thanks again.

    Best regards,
    Otto Smittenaar

  3. 3 Posted by davidjohnmacdon... on 30 May, 2016 01:53 AM

    davidjohnmacdonald's Avatar

    For what's its worth, I have not found this to be the case in my own "multi-multi-file" documents. My MMD file transclusions with {{file.md}} are always relative to the file that has the transclusion. I actually can't do it the way Brett is suggesting because I need to generate HTML/PDF of some parts separately from HTML/PDF of wholes.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac