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

Actually it depends. If you want the full chapter title (including number), then yes, you can do that using Scrivener links, but if you just want the number, then no. But if this is something that drives you back to Word, then Scrivener’s probably not the right tool for you anyway. :slight_smile:

All the best,
Keith

That sounds a bit like a challenge. :wink:

I had a look at scrivener links and they might be what I need. The only problem I see with them is that I can’t get them to work in footnotes. And I write many footnotes along the lines of “See 5.4 Recreational Needs of Prawns.”

Is there a way to get scrivener links to work in footnotes?

Only inline footnotes - you can’t use them in inspector footnotes at the moment.
All the best,
Keith

Spent another few hours tinkering and this is what I did. I hope it makes sense.

I have 7 files in my binder:

Table of Contents
<$hn> Aye
[subchater] <$hn> Aieiei
[subchater] <$hn> Alpai
<$hn> Bla
[subchater] <$hn> Blub
[subchater] <$hn> Bliee

After compiling, every chapter-heading has the correct chapter number. But the ToC (which I created following the manual) doesn’t - every number equals 1. And if I use a scrivener link in an inline footnote (which otherwise work for me) in “Aieiei” referencing “Blub”, then the result is “Blub 1.1” and not “Blub 2.1”.

I understand where the unintended numbers come from (it’s always current position in the document), but I tried lots of other placeholder tags and had even less success. Am I approaching this the wrong way?

I think that it all depends on how many items you need to x-ref and the complexity of the cross-referencing. I had 5 to 15 figures and tables in each chapter (5 chapters), and used Mellel back then. I used a special highlight to mark x-refs I had to solve, then you move from one to another with the highlighter search. It worked very well to me. Highlighters in Scrivener work in a similar way, so you can try if that works. I resolved all of them in less than half a day when I turned in the final/final version. Unless you’re dealing with a lot of items and very complex x-ref needs, in my opinion the need of real-time cross-references is overrated: it slows down and is distracting of your writing.

I was able to do this fine. Here’s how I did it:

  1. I set up a project with two folders (“Aye” and “Blah”) each containing two text documents each (“Aieiei” and “Alpai” in the first, “Blub” and “Bliee” in the second):

  2. I created a document entitled “Table of Contents” above them:

  1. I selected all the six documents I wanted in my table of contents and then used Edit > Copy Special > Copy Documents as ToC

  1. I clicked in the “Table of Contents” document and hit cmd-V to paste in my ToC (the formatting was a bit screwy because of the short titles, so I could have adjusted the tabs, but I knew that when the tile prefixes got added it would look fine, so I just left it as-is).

  2. I checked “Compile As-Is” for the table of contents in the inspector.

  3. In one of the documents, I created an inline footnote and made a Scrivener link to the “Blub” document:

  1. I went to File > Compile…

  2. In the Compile sheet, in “Formatting”, for both the folder and single text document rows, I set the “Title Settings” to have "<$hn> " as the tile prefix:

  1. In the “Processing Options” I changed the “Title prefix separator for inline links” to be a single space, because my title prefix and title are on the same line anyway so I don’t need to change that for inline references.

  2. I hit “Compile” to create a PDF file.

My table of contents came out as expected (well, the folder titles did turn out to be too short and so I should have adjusted the tabs after all, but this wouldn’t be a problem with real titles:

As did my footnote:

Hope that helps!

All the best,
Keith

Oh this is genuis! Exactly what I need! Thank you!

I shall print this out, frame it, and hang it on the wall next to my “Staying in the Zone” poster (but not too close, the poster needs its space around it for optimal impact), because there is no way I’ll manage to do this by myself if this thread gets lost (and I really did try hard). :smiley:

Now I hope I’ll mangage to find my flow in Scrivener and then I’ll be back in the forums for sure.

Cheers!

I hope I’m not taking this thread entirely off topic now, but is there a way to format Scrivener links in a certain way? Let’s say, at a certain point in the text, I want to write “5.4 Cloudwalking explains how you can grow feet large enough to walk on clouds” and I want “5.4 Cloudwalking” to be bold, italic, in inverted commas, etc. Is that possible?

And thanks for the suggestion chantun! This will come in handy indeed!

Glad that helped! We do very much need to create a proper video tutorial for this - it’s on the list, so there will be one in the next couple of months or so, but there are lots of others David’s working on too.

Regarding Scrivener links, the only way to do this is to format the link in the text itself:

All the best,
Keith

Thanks for that again. So obvious I simply had to not think of it…

Two more problems/questions I’ve run into:

If I Scrivener link to an auto-numbered file (say to “Glue” -> auto-numbered “2.1 Glue”) and then go and change the name of the file (to “GlueK”), then the link is not compiled properly anymore. It keeps the old name (“Glue”) and drops the numbering entirely (i.e. the result is just “Glue”). The name ends up being wrong and the numbering disappears. But inside Scrivener the link still works (i.e. it points to “GlueK” now although the link itself still says “Glue”). Am I doing something wrong again?

And a question about quotation marks. What is the difference between “” and “”? I never understood, but I didn’t have to. But now if I use “”, then all is good. But if I use “”, then they stay “” in the ToC and are turned into “” in the body of the text (after compiling). I only got “” because I copy&pasted from Word, but when I type new text into Scrivener and use “”, then I run into formatting problems. What should I do?

Regarding the quotations, the fancy ones are “smart” quotes and the others are straight quotes; the default options are set in Scrivener>Preferences>Auto-Correction. You can use the compile text options to change all quotes to one type or the other, but since your TOC is set to compile as is, those changes don’t affect it. You can make the changes in that document directly by using the appropriate Format>Convert option (straight to smart or smart to straight).

Thanks MimeticMouton. I’ll be going with smart then. :slight_smile:

And regarding the Scrivener links, does anybody know if there is a way to keep them up to date automatically?

Presuming you mean:

You start typing in a title field somewhere in the binder. After each letter you type, Scrivener starts hard searching your project for strings of text that look almost but not quite like the phrase you are typing because you just changed it and then cross referencing any match with a separate link file that tracks link position by byte offset…

then no. :slight_smile: Think of the significant (in large projects, on order of tens of seconds) delay after each letter you type, whenever typing any title at all (because there is no way it could know beforehand if there is even a link in existence for that title or not).

You, however, can do so fairly easily. Use the Find by Formatting tool to search for links and enter a bit of what the title used to be before you changed it. You can step through the project one by one (again a massive automatic search would take too long).

Thanks for the reply, but I’m not quite sure I understand. :slight_smile:

What I do is this:

  1. I have a file in my binder named “Glue”. Everything is set up the way Keith described above so I can create an auto-numbered ToC and it works well. At the moment, “Glue” results in “2.1 Glue” in the Toc.
  2. I create an inline footnote somewhere in the text saying something like “See chapter Scrivener Link to Glue.”. The result in the compiled document is “See chapter 2.1 Glue.” All is perfect.
  3. A month later in my writing the file’s name has changed to “GlueK” and it has been moved. Now the result in the ToC is “2.2 GlueK”.
  4. But the footnote now says in the compiled document “See chapter Glue.” The numbering was dropped and the new name was not adopted. But in Scrivener the Scrivener Link still points to the correct file “GlueK”.

What I’d like to achieve is for the result of step 4 to be “See chapter 2.2 GlueK.” Is this possible?

OK I’ve been using Scrivener for 2ish months now and like it, a lot. Have already advertised it quite a bit here at my uni among PhD students.

But that was TOTALLY off topic :wink:

Maybe my above question makes it sound a bit more complicated than what I want to achieve, but does somebody know if I can do with Scrivener what I’d like to do?

I basically just want to put a placeholder in my footnote that points to a certain chapter/folder and will be converted into that chapter’s number and title, as current at the moment of compiling. At the moment I can do that if I use Scrivener links as described above. But if the position or name of the chapter/folder changes, the result after compiling is mush.

Does that make sense?

Yes, it makes sense. There’s not a way to automatically do it, but as Ioa said, you can search through your draft before you compile to update the titles in your Scrivener links. As long as the link title matches the document title, the auto-numbering will work properly during compile even if you have moved the document. (You will of course need to be sure to update your TOC before you compile if you switch anything around in the binder after making it, since it’s a static list.)

  1. Before you compile, select everything in the Draft folder
  2. Open Edit>Find>Find by Formatting
  3. Choose “Links” from the “Find” dropdown
  4. Choose “Selected Documents” from the “Search in” dropdown
  5. Choose “Scrivener Link” from the “Type” dropdown

You can now step through your draft and ensure all the document titles in your links are up to date. When you find one that’s incorrect, the text will already be highlighted in the editor from the search function and you can easily type in the correct name and carry on the search. If you know specifically which document titles were changed, you can speed this up by typing in some of the original document title (as it would appear in an outdated link) in the “Containing text” field. It may be worthwhile to do a thorough search through all your links before a final draft, though.

Also to make this faster, I’d recommend doing the search before creating the TOC or else excluding the TOC when making the selection in step one, as it consists entirely of links and will take you a bit of time to click through.

Awesome, thanks!

I’ll have to sit down and do this properly sometime before I really understand how this works. But I’ll be sure to give feedback.

I need a thumbs up smilie here

Sure. Once you do it, I think it will make sense. The title in the link doesn’t auto-update because it’s just a link applied to static text, the way you’d select some text and assign it a hyperlink. The link is pointing to the document using the ID number Scrivener assigns it, so it remains working even when you change the document title, but the anchor text doesn’t change–consider that you can create a link on any text; it doesn’t have to be the name of the document you’re linking to. Scrivener has no way of differentiating between times when you want the text to match the title of the linked document and when you want it to be something else entirely. Which is to say, it doesn’t really know or care what text you’re using as an anchor, and it’s not going to presume to change it for you. :wink:

I meant to add to the above, if you aren’t sure where the link is pointing to or if the title is right or not, you can hover over the link a moment to pop up a file path that will show where the link directs. Depending on your preference settings, you could also just click the link to open the file in a Quick Reference window and check the title from that.

This explains Scrivener links quite well. Thanks.

But just an idea: wouldn’t it be possible to add a feature where instead of having a Scrivener link that is applied to a text, I could simply insert the ID of the document I’m pointing to and then in the Compile dialogue have a tick box saying something like “substitute document name for ID”?
Or there could be a toggle somewhere in the preferences or in the View menu that switches between ID and document name for the current view? But this would probably add some CPU load (or something else) to Scrivener, because it would have to update links constantly. But option 1 wouldn’t, would it?

I’m no programmer at all, so that was just an idea.

I probably should have created a new topic for this, but now it’s a bit late.

Thanks again for the instructions, they are very good and did help, indeed.

However, I’m not convinced yet if using Scrivener links has any real advantage to me over (as suggested before) simple highlighting and then using find by formatting. OK, now I’m exaggerating, the advantage is that the numbering is correct. That’s a big advantage. But it’s still a slightly messy process. I have to:

use the find by formatting feature,
click on the highlighted link so the highlighting goes away,
click again to open it in the other editor,
click in the title of that editor,
select all,
copy,
go back to the first editor,
click find next/previous,
hit cmd-opt-shift-v to paste over the old text.

The thing is I have so many chapters and subchapters that I can’t be sure a link name is correct without clicking on it. I can hover and see what it’s pointing to, and then verify that the spelling is identical. Then I only have to click on the link if the spelling is wrong. Which is doable, but it leaves a margin for human error - especially at 5am before the deadline.

This is still the best solution I found, but it’s not smooth by any means. I would much prefer just inserting the document ID instead of a Scrivener link and letting the compiler substitute the document name for the ID. I wouldn’t have to worry about any of this any more.

Is there any chance that such a feature will be introduced in the future? Or, even better, in the next 4 weeks before I have to hand in my dissertation?