Dynamic internal document references?

I can’t seem to figure out how to make a reference at one point in the doc to another. I’m not talking about a clickable on, but in text books like non-fiction you often direct the reader to “XYZ Topic” on page 123. It might be:

“XYZ Chapter Page 44”

But that page number is going to change, and if the target title changes, how will the reference pointing to it change? I want to cover one thing now, but instead of typing it twice, just refer the reader back/forward to a specific place in the document, along with it’s title (or not, if in the middle of a titled section).

You see this in MSWord, where it auto-numbers things like figures. Once you make a reference to that figure, any references to it will contain the target’s text, and will update the current page number it is located at as it changes.

Hope this makes sense.

1 Like

Scrivener is not MS Word. Document links/references don’t work the same. MS Word is all about the presentation of a monolithic document. Scrivener is about writing the document in the smallest possible part and stitching it all together in Compile. Scrivener has no concept of page numbers. A reference will always go to the same location no matter where it is located. You can achieve the same results without the absolute page number reference, or export the Compile output to MSWord and do it there.

Greetings Easily.Distracted. Welcome to the forum! You will find much here to help you live up to your great name!

It sounds like what you want to do is is create cross references, within the text, to other areas of the text, and you want to do this by page number, and have the page numbers auto-update as you move text around. That can’t be done in Scrivener. As Jestar said, Scrivener knows nothing of page numbers. What Word does in that regard is a whole other set of tricks within a single document. Though even there, it can be less than fun to set up internal “live” references in documents that are still being written, and where the data fields that make up the references, which do not always display on screen, need to be approached as though armed and dangerous and handled with care. Indexes, ToCs, bookmarks, etc, are all like that.

Working in Scrivener, you would need to find a way of tagging these references now, by something other than page number, in a way that could later be replaced by final references. Scrivener has footnote and other annotation tools that perhaps could be useful for this.

Depending on how many there are, among another things, the easiest way to do this might be with simple text tags. Once the document is complied in Scrivener, searching and replacing the final references in Word would be fairly simple. Depending on details, including your tagging system, Word macros might be able to automate most of it.

What you can do, is create a Glossary using Document Links to separate Glossary item documents, gather them in a Glossary folder and Compile that into a full fledhed Glossary at the end of your Manuscript.
In de Glossary items, linking back to the original location is rather easy. Mastering Scrivener contains an elaborate discription in how to do this. What you’re missing out on is Pagenumbers.

Sectioning your work at the right level of granularity and having the right kind of navigational markers in your book layout can go a long way toward eliminating the need to refer to page numbers in addition to chapter/section numbers.

So, make sure chapter and section numbers show up in the running heads at the top or bottom of your book pages.

For many kinds of writing cross-referencing by numbers related to the document structure is preferable to page numbers, insofar as the work might also end up in ebook format — where page numbers are not a stable reference point.

Section 10.1.4 of the Scrivner for Mac user manual has information about how to create cross references for readers.

Does that cover your needs?

1 Like

Dictation misspelled that, and I didn’t notice at the time. Should of course be Scrivener for macOS.

(And as a new forum user, I can’t edit my posts.)

Sample project and compiled PDF attached. The page numbers in the PDF are clickable for navigation purposes.

cross-refs.zip (83.9 KB)

1 Like

Note that the strategy using doc links with embedded <$p> placeholder targets a document not a particular point in the text of a document.

Since Scrivener allows you to split your text into different docs without penalty, to get as close as possible to your target, split your docs as necessary so that targetted points are in the first paragraph in a doc. That will get your page number ref within one paragraph of your target. (That can still get page nums that are one off of ideal, of course, if page breaks fall unfortuitously.)

1 Like

Yes, the compile format is important here.

If compiling to ePub, for example, it is possible to link to specific paragraphs. Sample attached.

cross-refs-epub.zip (70.5 KB)