Transclusion on export

Not possible. Probably never will be.

@bernardo_v, can you expand on why it “never will be”? Is it a bad idea for some reason or technically difficult? I would like this ability also.

1 Like

I am now realizing that not having transclusion on export is actually a huge limitation of Obsidian. Anyone who aims to write anything long-form, using a note primarily made of links (i.e. a Table of Contents note or an outline note) to organize a longer piece, where the links target smaller notes that are paragraphs, will face an unpleasant surprise upon finishing and learning that there is no way (that I can see) to export the whole document without 1) manually cutting and pasting all individual notes or 2) using some external program to parse the markdown files and combine them.

If anyone is aware of any Windows programs (other than the command-line Pandoc) that can combine markdown files in this way, please post here. I’m now scared to write articles in Obsidian!

7 Likes

Have you tried Writemonkey? I’m thinking that might be a way to write multiple files in Markdown and combine them as a ‘project’. Haven’t tried it myself, but the writer says it’s possible.

I actually misread something which rendered the idea unfeasible. Simply exporting a file with the transcluded content replacing the placeholder should not be difficult at all. I’m sure this will be possible at some point.

3 Likes

Not possible right now, will be part of our Markdown export functionality.

Obviously after exporting to non-Obsidian flavor markdown, embed won’t auto-update any more, so please do that as a snapshot. We might add an HTML comment to indicate where the embed comes from, so that the connection doesn’t get lost.

If you’d like getting it tracked, please post a feature request.

15 Likes

This will be a great feature to have.

4 Likes

Can‘t agree more

2 Likes

+1. Being able to print/export as a pdf is essential.

Hi there,

I’ve been away a while…what is the current state of export? Can we export to Word with transclusions easily?

+1 here as well. Having transclution on export is critical for any serious writing of long manuscripts.

2 Likes

Ideally this can be implemented as export-to-markdown. The use case is that this can then be used in pandoc to produce docx, pptx, reveal.js, and other formats.

The export-to-pdf function already includes transclusions in the final PDF output. So this feature could be implemented by making the export-to-pdf functionality more configurable. Instead of exporting the generated markdown (with transclusions) into the Obsidian PDF converter this function could emit the markdown output to a file. It seems less work than what export-to-pdf is already doing.

Would be great to have this feature. It would make transclusion a very powerful feature.

6 Likes

+1 here for any kind of integration of the transcluded information into any kind of output, be it printing or md exporting. This would enable a lot of functionality for output generation.

Yes, please!

There actually is a way to do this now, but it’s certainly not intuitive. Here’s the procedure:

  1. Select a small bit of text at the top of the preview pane.
  2. Hold down your SHIFT key and then press your PAGE DOWN key multiple times until all of the text has been selected.
  3. Copy the selected text.
  4. Paste into Typora–or just paste into a new document in Obsidian.

Tada!

Note that just pressing CTRL + A to select the preview text will not work. Neither will selecting a bit of text and then pressing SHIFT + CTRL + END.

Can’t we please just have the preview (the transcluded text) open in a new document rather than the preview pane? Or at least have that option? Or have the transcluded text included in an export other than PDF? Markdown!

Thanks!

3 Likes

That would be great for presentations!

Now it’s impossible to have embed files in a presentation, but if we can export it to a new markdown file, it’s possible to present this file.

This post appears as “resolved” but I haven’t see any explicit solution. I recently made another post which I believe are quite related (insert-paragraphs-for-docx-export. Basically I’m trying to have a completly functional workflow for using Obsidian for writing Scientific articles

Right now, I’m struggling (as you, I think) on composing a Outline/main note file that stores the content of other “atomic” notes at the same time that I keep the citation style.

When you use the core “Export to PDF” command you can get the content of embedded links ( “![[this is an embedded link]]”) but you cannot include formatted citations this way. I’ve tried Pandoc, and it solves the citation part, but then I can’t manage to include the content of my embedded notes!

Anyone knows of some work-around/plugin that could work?

I think that it was marked as resolved because OP should have made a Feature Request as Licat explained here

Yeah I would love a workaround to include transclusion in exports to docx. Pandoc does not recognize transclusion. Seems like converting pdf (exported from Obsidian) to docx is the closest we have.

Not quite the ideal solution but I do enjoy procrastination by writing plugins, so I might add pandoc to it, I currently just use pandoc from the command line.

I wrote a plugin that pulls all transcluded content and internal links into another document - which you can then convert to whatever using pandoc. It also supports nested content, so if your atomic notes has a link to another one, it will just replace that link with it’s content. It only reads your notes and writes to a new file. I’m writing a dissertation and wrote it for myself. I’ve only tested it on Windows 10. Also check the settings, especially whether you want your notes in separate folders or not. I keep everything in one folder but the default on the plugin is a folder called notes. I will fix this, as soon as I’ve written a few more pages of my dissertation.

It doesn’t support block embeds yet - didn’t even know about them when I wrote the plugin.