"Embedding" scrivenings inside other scrivenings

Don’t know if it is already possible (haven’t found anything in the forum) if not, please move it to wish list section.

I’m writing my PhD dissertation and got a lot of quotes on the “literature research” folder. They are all well structured and tagged (Thanks Scrivener!) but… I’d like to “embed” some snippets in the text body.
I say “embed” because I would NOT like to loose the original order/position of the scrivening I want to use as “snippet/inline quotation”.

In my master thesis I cut the original scrivenings of the chapter and inserted the quotes in between the parts, but that made the whole structure VERY messy for me. Unnecessary fragmentation and loosing the order of the literature research…

There is a feature that is great for snippets in my opinion: a placeholder tag that will take the contents of one item anywhere in the binder and insert it at the placeholder. This can be done to whatever scale you require. The placeholder can be the entirety of the item’s text, meaning it acts more like a clone or a proxy of the original. Or you can scatter these placeholders throughout a larger section of text, having them insert snippets and such where needed—even inside of other things, like inline footnotes.

To get started, type “<$include>” into the editor where you want the snippet to appear. There are two ways to go here, you can supply the binder title of the item you wish to include, like this: “<$include:name of snippet>”, or you can select the short code and add an internal hyperlink to it, pointing to the item that should be included. Which to use is a matter of preference, though there is an edge to the hyperlink method if you have a lot of duplicate titles in the binder. Otherwise having a hint as to what is being included, printed right in the editor, is nice to have. In fact with the hyperlink format I’ll sometimes put a short inline annotation after the link to indicate the content.

Full documentation in §10.1.5, Including Text From Other Documents of the user manual PDF.

Re-opening this old post (first must thank AmberV for the help).
Does anyone know a way to embed and see scrivenings inside other scrivenings?
I use the <$include:Title> and work wonders. I took it further and use the copied title from the Binder, so it doubles as a link to the text, but I’d like to see it inside the host scrivening in a kind of frame. Perhaps it is not possible due to the possibility of an “facing mirrors” effect by embeding a host inside its embeded document but I hope there is a way…

Yeah, it’s not really possible to do that—for the reason you surmise—to insert text into the editor that doesn’t exist in the file it is editing (without it being actually inserted of course).

Since you’ve got a link though, you might want to check out the modifiers you can use on links, and as well the settings for what clicking on links do. The settings are in the Behaviours: Document Links preference pane—you might find Quick Reference or Copyholder to be less disruptive than the default of having links open another split or change its contents, for instance. Myself I prefer to have it act more like a Web browser and just open in the same editor. I can always, again like a browser, get straight back to where I was with ⌘[, so it’s no big deal.

The modifier keys for temparily changing how a link works when you click on it are documented right at the top of §10.1.2, Using and Managing Links, pg. 211.

Is there any way to include text from another section/document? For example,

In one section, I want something like:
#include Introduction
Some text
#include SubSection1
#include SubSection2
Some text
#include SubSection4

In another section, I want something like:
#include Introduction
#include SubSection1
Some text
#include SubSection2
Some text
#include SubSection3

And I don’t want to maintain two copies of Introduction and SubSection*

It would also work if there is a way to link two sub-sections, i.e., mirror texts. For example:

Section A
__Introduction
__SubSection1
__SubSection2
__SubSection4

Section B
__Introduction (linked to Instruction in Section A)
__SubSection1 (linked to SubSection1 in Section A)
__SubSection2 (linked to SubSection2 in Section A)
__SubSection3

Look up the <$include> placeholder tag.

This is exactly what I’m looking for. Thanks!
Manual 10.1.5 Including Text From Other Documents

In the MultiMarkdown compiled file, the <$include:> becomes
\<$Include: [3.1.2 Subsection-title][]\>

How can I pull in the actual text of the subsection in the compiled markdown?

It looks like you have a space between the “:” and the binder title, breaking the placeholder syntax. You should be able to compile hyperlinks (for your convenience, they will be ignored) with this placeholder, but so long as it looks like <$include:name of item>.

Also note that if you do wish to link these up, you can also just use <$include> by itself, linking the entirety of the placeholder to the target. Including the title can be useful though as you can more easily see where it goes. Myself I prefer to use the linked placeholder method with an inline annotation after it to say what it’s going to. That way I don’t have to worry about binder title name changes breaking stuff.

2 Likes

Yes, this is indeed my problem. Thanks!

1 Like