Figure numbering and cross-referencing--explain it better!

I am still a newbie user of Scrivener (and these boards) but I think that this hasn’t been addressed yet.

I needed to figure out how to insert a figure and make a reference to it, in a way that allowed me to rearrange sections ad libitum. I read the manual, including the FAQ, but it really didn’t make any sense to me until I read this post from 2007!

I really think that the manual needs to explain this wonderful feature more clearly, and it really should stand alone, and not be hidden in a FAQ entry.

It’s been said a thousand times, but… Thanks for such a great product!

Blimey, you’re right… I’m embarrassed to say this, but… I completely forgot I’d ever implemented that. So pretty much no one knows you can do that (and I had to test it myself to make sure it still works). Yeah, this definitely needs documenting!

I’ll add it to the list of cool stuff that needs documenting in 2.0!

Thanks for reminding me about this,
All the best,
Keith

EDIT: Although, after checking the Help file, I can confirm that this is covered in the Tips & FAQ section of the Help file (it just needs placing somewhere more prominent!).

Actually, I think it needs a (not difficult) rewrite and made more prominent. The role of the third parameter as a read/write variable is very obscure in the FAQ writeup. If you want me to take a crack at this, let me know.

Thanks for the offer, but don’t worry - it needs rewriting for the 2.0 documentation anyway, along with explanations of lots more tags that are available in 2.0. For instance, 2.0 allows you to have tags for your name and address in template projects, tags for cross-referencing page numbers when exporting to PDF, and a whole variables pane in Compile Draft - it will all need explaining in depth in a dedicated section of the Help file, and the cross-referencing tags would be best placed as part of that, I think. And then we’ll put them in a tutorial on creating academic or technical documents too, perhaps.

Thanks again and all the best,
Keith

Hey Keith (or Ioa)–did this part of the manual ever get written? I can’t find anything on the $ variable usage. Maybe it is coming soon?

BTW–I love 2.0

There are some more advanced parts of the manual that Ioa is still working on, so this might be one of them. The initial version of the manual should cover all the main features, and some more advanced features will be added later (poor Ioa didn’t get chance to do everything - the manual is novel-length!).

In the meantime, you can find a list of all tags and variables, with a brief explanation of each, by going to Help > Placeholder Tags List…

All the best,
Keith

Yes, I found it: Appendix C: Replacement Tokens

I didn’t know what phrase to search for in the manual. And the help menu is very helpful.

Hmm, it seems we haven’t decided on a phrase for them between us, either. :slight_smile: Ioa calls them “Replacement Tokens” and I’ve called them “placeholders”, “variables” and “tags”, variously.

Any suggestions for the most user-friendly term much appreciated. :slight_smile:

If this can be posted or even emailed very soon (I am compiling a dissertation as we speak) that would be great. It doesn’t even have to be pretty, just some more information.

Specifically, I would like to understand how to reference Introduction, Section 5: “Theosis” in some other chapter, and have it auto-humber the “five” and grab the title or whatever metadata I need to enter for a given section (which is also a discrete file in the binder).

Is this even possible?
Thanks
Maria

Yeah, actually standardising that to “Placeholder Tags” is something that still needs to be done. There might still be a few references to “Combined Text” instead of “Scrivenings” as well. :slight_smile:

In regards to your question: You can create a static number counter by using names, like this:

<$n:section:Theosis>

The first time the compiler encounters that, it will increment the $n numerical counter and emit that new number. The [i]second/i] time it encounters that same code, it will not increment it. This present a small limitation in that you can’t easily forward reference items, because if the reference proceeds the section itself, it will end up incrementing the section counter in the reference. The other thing to note about this feature is that it allows multiple streams for the $n counter, based on the second variable, “section”, in this case. You could have another set called “:chapter:” going along in parallel.

Another strategy you could employ, if working with a word processor that supports RTF bookmarks, is to refer to page numbering. If you enter something like, “See Theosis (page <$p>)”, you can highlight the <$p> part in Scrivener, and create a Scrivener Link to the actual section file in the Binder. When you compile, this will create a page-numbered reference to that item. But if your style guide calls for using section numbers instead of page numbers, that trick won’t help you out.

I think I am a little confused. I do the following:

Insert <$n:section:Theosis> in the actual section entitled Theosis. Or the actual title of the file (really like this feature!).

Then, somewhere down the line, I insert something like “See Section <$n:section:Theosis>” which should output “See Section # Theosis.” Something like that. Yes?

For the most part, my sections will preceed the reference. When it follows, I usually say something super-generic like “in chapter 4.” I don’t actually have a rigid style guide, so I may to the page numbers, that is very handy.

Question though: once I export into Word, and repaginate due to references, etc., will the <$p> update?

Thanks,
Maria

Actually in your example it would become:

“See section #”, with the “#” becoming a number. The part after the final colon is just a keyword.

The bit before the first colon tells it what sort of auto-number type to use ($n);

The second part tells it what auto-numbering this stream this is.

The third part tells it that this should increment the number if a different word.

But the whole tag will result in a single number, nothing else. I need to put a better explanation and tutorial together for this, because when used with the Replacements in the Compile sheet, it is quite powerful and useful, but I won’t do a good job of explaining it right now as it’s nearly 2am. :slight_smile:

Best,
Keith

that helps. I realized that was the case after I typed it. I have successfully figured out image before, but I didn’t realize that when I but “figure” in the code, it was a unique stream. That is very helpful to know.

However, what about the updating <$p>? Is it inserted as plain text or a field code that Word knows how to update?

sleep well!
m

When you Scrivener Link a <$p> tag, Scrivener inserts an RTF cross-reference code into the document at that spot. This code connects with an RTF bookmark tag which is emitted at the top of every document that is exported (though this behaviour can be disabled for minor sections, on a per-hierarchal depth basis). So the word processor reads in the bookmark tags, paginates the document according to print settings, and then produces real-time page numbers according to that pagination. If you were to heavily edit this document in a word processor, it would update the pg. reference as you type.

As for Scrivener, it doesn’t need to bother with any of that. It just inserts the codes that enable that feature in compliant word processors. I think some word processors will even give you a modicum of control over appearance at that point in the cross reference. Mellel for instance, I know you can set up styles for cross-refs and specify the formatting for how it will look in the print-out. I’m sure there is similar in Word, buried somewhere in that Ribbon. :slight_smile:

I am graced with a mac, so not cursed with the ribbon. if my entire faculty weren’t married to word I might have switched ages ago, but alas, conformity is the rule of academia. :wink:

ugh, sorry, meant to say thanks. brain is fried, courtesy gone.

Ha, it’s okay, and you’re welcome.

But be aware that office 2011 for the Mac is in fact going to be succumbing to the Ribbon.

Hi! Another newbie here.

I spent the past few hours (more like half the day) watching tutorials and browsing the forum instead of writing my dissertation, so I think it’s time I simply asked and got back to work. :slight_smile:

Is it possible in any way to cross reference forward? Let’s say I want to explain the structure of my diss on page 1 of the introduction and need to name all chapters including chapter numbers (that are still constantly changing).

I do cross reference chapters a lot a lot a lot. This would make my life SO MUCH easier I might just start crying if somebody told me it’s possible.

Side note: yesterday I was as Word 2008 user and not too worried about it and today I’ve read about Scrivener, LaTex, FrameMaker, and MultiMarkdown. Do I need any of these (beyond Scrivener, of course)? And I do understand this is a slightly subjective question. :wink:

Cheers from Oz

Not reasonably, because the cross-reference code is the same as the anchor code. Since they are identical, which lands first is the one that will increment for that stream. The only solution that works is one that I used to use ages ago, back when the FAQ was on the forum, and that is to pre-anchor everything Basically a master list at the top of the document that has every anchor you intend to use, in the order you use it. That way all of the numbers are already calculated in order, and then both instances of reference and actual anchor spot are just recalls of the original sequence. This worked for me because things were fairly static. The FAQ was built up sequentially and I had no reason to re-order it over time, so the master list didn’t need to be adjusted every time I moved something in the Binder. The other drawback is that you have to always remember to delete the master list number output from your compile.

So, the answer is basically no. There is a work-around if your work is static enough, but it’s a bit clumsy. If you need heavy cross referencing, you really should be doing that in an environment that has a lot of tools for doing that: LaTeX, Mellel, Word, whatever.

Now that was not the answer I was hoping for. :frowning: But thanks for the quick reply!

sigh back to Word 2011, I think. Not sure I understand what LaTeX is and Mellel looks a bit daunting. I’ll play around with Scrivener a bit more. Let’s see how I go.

I should, however, concentrate on the actual writing, not the tool…