The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Table of Contents generator for long documents (http://forums.omnigroup.com/showthread.php?t=29840)

realbrick 2013-06-02 12: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.

[url]http://omnigraffletips.blogspot.com/2013/06/script-to-generate-table-of-contents.html[/url]

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.

Cheers,

- Joseph


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

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