Appendix coding question

Is there a way to code an appendix so that the document can find the page numbers where a word exists and put them in the appendix. Similar to the TOC <$p> code.

For example my document includes slang I want to further explain in the appendix, if the slang is “knackered” is there a code I can insert so that the document can locate all instances of “knackered” and insert the page numbers into the complied manuscript, or is this something I would have to do manually?

Thanks in advance for any help!

What format are you compiling to?

A paperback book, ideally I’d like it to work for an ebook as well

By format I mean more specifically the file format. Are you going to export your work to a docx file? Or a markdown file, perhaps?

Oh I’m sorry, I usually do a PDF file

In InDesign it’s called an Index. It does exactly that.

You can create a Glossary as an appendix for your book using Document Links. You’ll have to create those manually and collect the Glossary items in a separate document. It’s good custom to link back to the place of the original link from the Glossary.

Thank you for the reply! Could you explain how I would go about doing this in a little more detail? I’m new to the program so I’m a little lost as to what this all means. I attempted to create links without footnotes and comments, but after doing so I didn’t see what to do with the link I had.

Thank you again for your help!

Maybe this:

Thank you so much! Maybe this is over my head… When I did the new link it created a link from the word selected to the appendix, I need it the other way around.

The only work around I’ve seen is making smaller scenes so I can pinpoint more exactly where the word is in a chapter so that I can use the <$p> code and select the scenes.

Unfortunately I wrote the entire novel out of Scivener and imported it once it was finished so I didn’t work with scenes, I just have chapters. I might have to go in and make scenes to accomplish this. I was hoping there might be something better, but oh well!

Thank you everyone for your help!

You’ll have to create a Glossary Document or better: Glossary Items in a Glossary Folder.

From the first you can link back to the place the Slang word originally occurred.

The second method, using docs per item, is more complicated compiling, because you’ll have remove New Page Separators in a Glossary Item Section Layout. But you can sort them and show them in Alphabetic groups. I’ve explained it in detail in my book.

1 Like

See §10.1.2 and look for “links are circular”.