My characters and companies all have things like tag lines or common remarks, so I have to search and replace constantly, but if I’ve mistyped I won’t find it.
I would love a place that holds text that I could then reference in all my regular files so that when I change it there, it changes everywhere. I suspect I’m not alone.
Thank you, enormously! And could you please point me to somewhere I might read more about it (I’m finding things on existent information, but not custom).
In case you haven’t found it yet, here is the reference to the documentation on this feature: §10.1.5, Including Text From Other Documents, in the user manual PDF. There are a few different ways you can use it, and it can even be used to pull data out of text files on your drive if you want—but for what you describe, keeping these snippets in the binder makes the most sense!
Yeah. I was gonna say something like that.
Say they’re all short text segments, you could use a specific tag (— something like a number referring to a specific text segment [=107] ) and replace those at compile, since by then you should know precisely what they have to be.
But as I read it, the OP said that these text strings change and he would like to be able to change them in one place and that would be reflected in all.
It sees to me that <@include> serves that perfectly, where changing Compile replacements is more onerous.
Is there (or are the perhaps plans for) the ability to mark some small bit of text (like a phrase) here and have text there auto-sync with the first text?
Use case:
In Ch 1, Sally says, “blah blah.” Later, someone says, “remember when Sally said ‘blah blah’ and …” and then later, etc.
It would be handy if I could magic-sync a chunk of text so that it automatically kept in-sync, so that e.g. if I change Sally’s first quote to be “blabby blah”, it would automatically get updated everywhere.
I’m currently working-around that by creating a holding document called “sync: Sally’s opening quote” (or whatever) and then everywhere that the quote comes up, adding an Inline Annotation “sync: Sally’s opening quote” and creating a Document Link to that holding document. Then when I need to make a modification to the text, I can go to that holding document and look at all the backlinks and update all the texts. Or a search for “sync:” inside an Annotation works also.
Honestly: that workaround works great in light of (1) this case doesn’t come up super often, and (2) sometimes I’d don’t want it to be 100% automatic anyway (say, a character mis-quotes, and that’s what I want, but I do want to manually adjust as needed), etc.
It would be helpful if I could have the backlink link directly to the link, instead of the document (sometimes the link and annotation are tucked in a few thousand words and there are dozens of other links and annotations in there).
It also would be helpful if I could Save As Collection the search results for Find by Formatting.
But both of those topics are probably off-topic (separate wishes) and only indirectly related to this wish: the ability to auto-sync some text.
What you are asking is what Microsoft Word does with defining a “chunk” of text as a named Bookmark, and then using the REF field named as the “chunk” to put wherever you want.
I cannot spot that Scrivener that that same feature, but what might work for you is to use Scrivener’s Replacement feature (part of Compile setup) replace something you define into your “chunk” text. For example in the compile settings:
replace “;text1” with "remember when Sally said ‘blah blah’ and …”
then Sally’s statement will be inserted wherever in your manuscript you typed the text “;text1”. I prefix this with a semicolon as it makes it unique and unlikely to be mistaken for real text.
Might be other ways, but this what I thought out that might work for you.
I’ve merged your query into an existing thread on the same topic. Please scroll to the top for the existing feature that does what you’re looking to do. Of note, you can use this inclusion placeholder and hyperlink the target to it directly, to have that target’s text printed at the spot where the placeholder is typed, which in turn creates the back-links in the Bookmarks tab that you’re looking for.
I do in fact sometimes use an inline annotation following the placeholder, to indicate the snippet being inserted there, as I’d rather have something I can see while skimming, rather than something (the link) I have to point at with the mouse and then sit and wait until the tooltip comes up. I’m far too impatient for that. Plus, like you note, you can locate these markers more easily if there is text beside them to search for.
Oh my goodness: this is beautiful. Thank you!
Aside: I’m a software engineer by trade, and over the last handful of years it has been astounding to me how often I have thought “You know, if I were the engineer building this project, I’d add this feature, or have it do this.” and then gone and looked, and sure enough: it already does that super well. Scrivener is astounding. Really makes my day. And I suspect that part of that is due to you @AmberV - so again: Thank You!
Huh. Is this a bug? It looks like when I <$include> twice in the same file, and select the whole thing (from ‘<’ to ‘>’, inclusive) and link it to the content, it only sticks the content in the first time.
This is:
scrivener 3.5 (17311)
macos 15.7.1
Compile for PDF
Hmm, yeah that does look like a bug in the Mac version.
Unfortunately it doesn’t even let you use the alternative form, <$include:Lunch> (without a link). Whichever comes first will block the second attempt.
Blast.
Well, this feature still makes my day – and now that I know the limitations, I’ll use it with abandon!
This is good stuff. No urgency on my end – you’re doing great work. Thanks!
So long as you keep your fish in a separate basket from the chips, you’ll be fine.
I should also note that text is only one thing you can include, all of the document placeholders can be linked to a target and have the target’s value printed instead. So this works nice with <$custom:metadata>, <$title>, etc. I use this extensively in the documentation. One shortcut entry in the appendix feeds all the shortcut outputs in the rest of the manual, for instance.