The Omni Group Forums

The Omni Group Forums (
-   OmniGraffle General (
-   -   Table of Contents generator for long documents (

realbrick 2013-06-02 01:46 PM

Table of Contents generator for long documents
I was in need of an AppleScript script that generates a table of contents that spans multiple pages due to a long document length. I also wanted to organize the table of contents by sections, as each section in the document is headed by a section-header canvas.

I created the script, and it's working great.

The script also has many properties (that start with "SETTINGS_") at the top that modify how the TOC looks, such as item height, font, number of columns per page, page margins around the TOC, whether or not a line is drawn beneath each item, where the page number appears relative to the canvas name, etc. (I'm pretty picky, so some of the settings may seem overly anal-retentive.)

The script and a post describing it are here.


Just copy the script, paste it into AppleScript Editor, change whichever SETTINGS_ properties you want, and run it. You'll need to make a blank canvas in your OmniGraffle document for the first page of the table of contents. (By default this is the second canvas, but there's a setting for that.) If additional canvases are required because the TOC doesn't fit on a single canvas, the script will add them.

If you have any trouble or run into any bugs, add a comment to the post, and I'll help you out.


- Joseph

All times are GMT -8. The time now is 03:00 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.