AppleScript to generate index for Pages
On 8 Jan 2021 SGIII said he(?) had an AppleScript that he was prepared to share.
I have a document I am working on in Pages that I'd like to add an index to.
Are you still prepared to share your script?
FN
On 8 Jan 2021 SGIII said he(?) had an AppleScript that he was prepared to share.
I have a document I am working on in Pages that I'd like to add an index to.
Are you still prepared to share your script?
FN
Hopefully, SGIII will respond and have something that does the indexing job for you in Pages.
Your plan B is to export your Pages content as Word, open that either MS-Word, or if in LibreOffice 7.2.5 or later, give chapter 15 Tables of Contents, Indexes, Bibliographies a read in the LibreOffice Writer 7.2 Guide (macOS Edition). This should not be misconstrued with fun but is a means to an end for index generation.
Because we are not Apple employees, there is a tendency to suggest what works, when it cannot be done in an Apple-branded product. There are occasions where I have recommended Word, Mellel, Nisus Writer, LibreOffice, Softmaker's Office 2021, Scrivener, and for more advanced DTP work, Affinity Publisher.
Too bad you don't happen to have a recent version of Word and Windows (even in a virtual machine). There is a product called TExtract (Windoze only) that can generate an index by dropping a Word or PDF document on it. 30-day free trial.
Thanks for that. Will have a look at it.
Maybe I was a bit harsh on LibreOffice. It does to the indexing, but, gets into a knott when trying to tag a word for the main index entry. It is unfortunate that Apple have not seen fit to include Indexing/Bibligraphy/Mailmerge in their otherwise very tidy product. I know one can get an AppleScript for the mail merge which works OK and Endnote ( a paid for product) does a fine job of Bibliographies.
I'll hang in here to see if SGIII may respond.
Thank you for responding and generosity in providing the links.
I am moving house over the next few days so will experiment with it when things settle down.
LibreOffice tags the words for indexing with XML tags surrounding the text. You can see this in the XML exported version of the document. If the indexing runs more than once you, end-up with the same tag repeated multiple times around the 'tagged' text. This becomes a problem when you try to mark an entry as the 'main' entry. Which tag set around the word is to be used.
All the above (re LibreOffice) is not relevant here as this is a forum for pages.
Hi VikingOSX,
I do realise that those who help here, like yourself and SGIII, are most likely not Apple employees. So no offence taken at your suggestions. They are read in the spirit in which they were given.
I happen to have access to Indesign, so if needs be I would use that. :)
Regards
Thanks Viking, I already use libreoffice for this but it makes a dogs breakfast of indexing. Not about to pay Ms for their bloated sw
Good luck with the indexing challenge, and stay healthy…
Frank, here is the link to the Pages AppleScript index tool download location posted by SGIII on Sept 16, 2020. This will download as Pages - make index - annotated.scpt. Just double-click that to open in Script Editor. Recommend you also download the sample Pages document too, so you see what the script is indexing.
Just downloaded both files a few minutes ago.
Yes VikingOSX found the post! The links to Dropbox downloads should still work.
If LibreOffice makes a dog's breakfast of indexing (I haven't tried it) then this script may not satisfy either.😀
It constructs page references (hyphenated when appropriate) based on search terms entered in a series of lines in the script itself. Let me know if there are any questions on how to use it. It should be straightforward.
It worked better for my purposes than I expected, with lots of flexibility. And the price is right.
But it does not provide professional formatting of the kind I understand one gets from Word (and LibreOffice?).
SG
AppleScript to generate index for Pages