Embedding notes using the transclusion syntax ![[ ]] works well for combining atomic notes to compose longer texts. It has been used to write articles, books, and even dissertations.
Within Obsidian natively, its currently only possible to export these transclusions to PDF. This has an additional issue of the fact that the transclusion is often formatted differently than the rest of the text.
It is critical to keep the source note (with embedded links / transclusions) separate from the compiled document (with transclusions resolved). It essentially allows you to move the big pieces (chapters, sections, or paragraphs) of the document around without getting lost in the details.
Proposed solution
A) Provide a native export to Markdown feature that transcludes embedded notes; or
B) Provide a native feature to compile internal note transclusions into a new note.
Current workaround (optional)
Using the Pandoc Plugin, you can export to HTML without Pandoc. Opening the resulting file in a browser allows you to easily copy the text and use it however you wish.
Edit: I saw on the Obsidian Roadmap that they are working on an Export to Standard Markdown feature. Fingers crossed that this will support transcludes.
I definitely agree! You linked to a request that has some decent support already. To me it seems very similar to what you are explaining (especially the lower part of the post which requires expanding when viewing here on mobile ).
I hope this gets more traction. I don’t know how I am getting by without this. It would really help in so many workflows. Good luck! Thanks!
Edit: @wjdenny Just realized you already liked the post. My bad!
No problem. I just wanted to shed more light on it and also try to centralize some of the workarounds and detailed proposal. I did some more digging, and found a CSS snippet that fixes the formatting of transclusions to fit in with the rest of the document. I edited the original post to show that.
That makes total sense. For me there’s always the temptation to just simplify and edit my feature requests, like the one you linked to, for example. In that case I did edit it because it was so confusing and messy. The downside in some threads is that it changes the context of any discussion. So I just leave them be. Of course in some cases it works out. In other cases the request collects dust until someone steps in and does it right. Or, eventually, sometimes a moderator kindly steps in and just comps it in a very straightforward way.
I think the Longform plugin addresses your use case, tho in a project-oriented way that’s not based on transclusions (which is probably fine since you’re talking about sections and chapters). (Note that Longform will change significantly in the near future when version 2 comes out).
I haven’t tried copying from reading view. I just tried now and that seems like it could work as another workaround. Thanks!
My reference to sections and chapters was more for other use cases I’d seen. I did check out Longform, but the overhead in setting up a project is a big deterrent for me. My most pressing use case would be in transcluding common bits of student feedback and related resources on assignments, and if I had to set up a separate project for each student per assignment, then there isn’t much labor saved.
Longform might be worth looking at again when v2 comes out (they’ve already changed the documentation to reflect v2). If I remember right, I think it’s gaining some flexibility. I don’t use the current version but will be checking out the new one when it’s ready.
I’m not clear what the roadmap means by “Export to standard Markdown”, it may just mean minor formatting considerations.
What you and I hope for is writing-to-actual files of transcluded files. And I think this perhaps should also do the same for the content of embedded search queries.
This would be in-line with Obsidian’s stated aim of future-proof files that are not dependent on an application.