Tag words for glossary

I am writing a book and would like to tag words in the text for inclusion in the glossary. In other words, I’m writing away, type a word or phrase, think “that should be in the glossary”, and want to quickly tag it without interrupting the writing flow (e.g., by going to the glossary and typing it in, then returning to the text). Is there an easy way to do this? Pardon if I’m missing something obvious.

It sounds to me like you might benefit from using hyperlinks for this. Consider the following workflow:

  1. You are typing along, and come across a term that should be defined. Select the phrase.

  2. Hit the ⌘L shortcut, which is bound to the Edit ▸ Link to Document ▸ New Link... menu command.

    Optimisation: if you tend to know before you type whether a word is significant, consider enabling the Automatically detect [[document links]] setting, in the Corrections preference pane. It’s the same exact thing, but without having to type, then select, and use a shortcut. It also has a secondary usage in that if an entry already has that title, it merely creates a link to it, rather than going through the dialogue box.

  3. In the dialogue box, you’ll probably want to leave the Title field alone, maybe just to capitalise it. The Destination should be set to the folder that collects your glossary entries.

  4. With default settings, a new split will open, where you can type in the definition. When you’re done, just click the split button in the main editor split to close the new one (or even just leave it open if this is going to happen a lot).

There are some optimisations you can make here to increase efficiency:

  • Use ⌃⌥⌘E to shift the cursor back to the main editor, right where you left off, so you can continue typing. At this point you could also hit ⌘' to close the other split.
  • The ⌃⇥ shortcut also works, though you have to cycle through the binder if it is open. I prefer just targeting the split I want directly (note that ⌃⌥⌘R targets the supporting split, if you want to get back).
  • You can change whether or not splits are used. Arguably an even more efficient approach would be to use Quick Reference panels, since a simple ⌘W will close the glossary entry and return you to your previous cursor position. The available choices for what happens are found in the Behaviors: Document Links preference pane, with the Open new document links in… setting.
  • My preference is to have new links do nothing, I can come back and define things later.

Of course, this does presume you have each glossary entry in its own outline item in the binder. If you aren’t doing that, it is definitely worth consideration. There are numerous advantages to constructing a glossary out of many smaller outline nodes. They can be linked to individually from multiple places, for one thing, but you can also use the Edit ▸ Sort ▸ submenu to easily keep them alphabetised, now and then. It can also be useful having your significant terms in the title list—for example, running a Quick Search for a word can let you know whether you’ve already defined it.

If you have been keeping them all in one giant listing, and wish to give the other method a try, note the Documents ▸ Split ▸ commands, which will be very handy for breaking up a glossary text into smaller subfiles by name. There isn’t much risk in trying, as you can use Documents ▸ Merge to bring them all back together into one file, if you find this approach produces too much overhead (do not that will cause your links to be removed as well, so you might wish to make a backup before doing that).

1 Like