Place Holder Tags - Associated with internal document links ??

The documentation for Placeholder Tags –> Document Variables says that, for many of these tags:
“If associated with an internal document link, gets replaced with the title of the parent of the linked document.”

What does ‘associated’ mean?? How does it work?

When compiling, I’m using Formatting -> Section Layout… Prefix’s and Suffix’s to output <$title>, <$parenttitle>, etc., I’d like to output link information somehow. I’ve tried various things but no luck.

If you understand, please enlighten me, thanks,

Well the archetypal example is Scrivener’s minimalist Table of Contents system. It uses the <$p> tag, which by itself would just get replaced with the current page number. But if you add a document link to it, the it gets replaced with the page number of the document linked too (in this case the association is retrieving the target’s final compiled page position and injecting it back to replace the tag). Likewise for things like <$label> or <$title> etc.

For tags which have no linkable data (<$date> doesn’t depend on the document or project, but the real world outside!), or project-level tags like <$surname>, document-level links will do nothing (I assume).

I don’t understand which “information” you want to extract? The <$tag> name itself provides the “information” like synopsis, label, status etc. In general, if you can use a <$tag> in the doc or compile, I would do it in compile rather than in the document itself, as it makes the separation of content vs. style “cleaner”…

Thanks for the reply, but I’m still confused. You write:
“It uses the <$p> tag, which by itself would just get replaced with the current page number. But if you add a document link to it…”
Add the document link to what exactly? the <$p> tag?

What I’d like to output is the title of linked document. So if I have Doc1 with a link in the text to Doc2, I’d the like the doc1 compile to some how contain “Doc2” (the title of the doc its linked to).

Exactly, simply type in <$p> in the editor, select the text then press ⌘L:

Scrivener document links do this automatically, without text selected press ⌘L, select your “Doc2” and a link with the title is added. Note that this link is “live”, in that if you change “Doc2” name to “Section2”, you can use the context menu on the link to update it. It should update automagically on compile too.

AND Scrivener does much more than this. For example what if you use numbered titles in your compile, then Scrivener can add the custom prefix and suffix back into the text. So for example you have “Discussion”, which in compile becomes “§5 — Discussion”, Scrivener can update the link in the text to have the full name. This is discussed in more detail in §8.5.7 of the user manual.

Ahhhhh - finally I see. Thank you!

– M