Sorting Words and Paragraphs in a Glossary
I have been trying to find a way to do an alphabetical sort to produce a glossary of definitions. The project is a manual that has many procedures. We would like to place definitions from all of the procedures and place them in their own section. We have looked for a sorting feature but cannot find one.
While InDesign doesn't have a sort feature built-in, it does come with a script called SortParagraphs.jsx. In CS2, you have to find this on your install disks or on the Web, but in CS3, it's installed automatically. When you select some text and run the script, InDesign sorts each paragraph alphabetically.
But I think what you want goes even further than this. It sounds like you want a tool to grab certain words or phrases, then put them in a list alphabetically. My first thought was the Table of Contents feature, but that can only grab whole paragraphs (based on paragraph styles), not words (based on character styles). Then I found the answer: The Index palette.
You can tag words or phrases throughout your document with the Index palette by selecting the word and (when the Index palette is open... choose Window > Type & Tables > Index) and then pressing the New Index Entry button (or pressing Command/Ctrl-U). In the New Page Reference dialog box, choose Suppress Page Range from the Type pop-up menu. That way you're just capturing the word/phrase and ignoring what page it's on.
Later, after tagging all the words you want, press the Generate Index button in the palette and it creates one for you -- alphabetized for your pleasure! -- and loads it into the Place cursor. Next time you need to update it, just click Generate Index again!
However, once you've made your list of terms, you'll want to add the glossary definitions, right? And that's where things can get messy. You can simply edit the index you made (it's just a text story, after all), but if you later generate a new index, it will likely wipe out all your work. (Replacing the old index is an option when generating an index, but it's easily overlooked.)
So what I would suggest is to duplicate the text frame with the index (or copy and paste the story into a new frame). Your duplicate is not linked to the original index, so it's not wiped out when you generate a new index. However, your edited glossary is obviously no longer going to stay updated with the rest of the document. So it's not a perfect solution.
(By the way, CS3 5.0 definitely has some problems with indexing multiple documents in a book. I know that Adobe is aware of the problem and they're trying to fix it. Perhaps a 5.01 will come soon! I hope so. More on this in a separate post.)