Catchword Generator

It happened one day after Jack had
received ſome very mortifying uſage
                                               from

Catchwords are an old-fashioned typographical feature, in which the first word of a page is “prepeated” at the bottom of the previous page. The practice fell out of use in the nineteenth century, which is probably why it is difficult — or at least labour-intensive — to reproduce this feature with modern desktop-publishing software. Catchword Generator is a script for Adobe InDesign to create catchwords automatically: it will run through the document and find all text frames that are threaded to another text frame, then add the first word of that next frame in a new frame below the current one. Catchword Generator is smart enough that when a word is hyphenated across frames, only the part after the hyphen will be used as the catchword. In addition, some options can be specified to control its exact behaviour.

System Requirements

An Apple Macintosh computer with a copy of Adobe InDesign. Catchword Generator should work with all versions of InDesign, though it has only been tested with CS5; the script will need a very minor modification to work with other versions of InDesign.

Note: Catchword Generator will not work with the Windows version of InDesign because it is written in AppleScript, which is not available under Windows.

Installing Catchword Generator

To install Catchword Generator, open the Finder and copy the file Generate Catchwords.scpt to the folder Library/Preferences/Adobe InDesign/Version <number>/<language>/Scripts/Scripts Panel in your home folder — where <number> is the version number of InDesign you are using (7.0 for CS5) and <language> is the language in which you installed InDesign (for example, en_US). These will be self-evident, because if you only have one version and language of InDesign on your computer, there will only be one folder available.

Note that under Mac OS X 10.7 (Lion), to access your Library folder you must click on the Go menu in the Finder and keep the Option () key pressed so the Library folder will appear in that menu.

Adapting Catchword Generator to Your Version of InDesign

If you use a version of InDesign other than CS5, the script must be very slightly modified to allow it to work. To do this, use the Finder to go to the folder /Applications/Utilities and open the AppleScript Editor application that is in there. Using the AppleScript Editor, open the Generate Catchwords.scpt file from the folder you copied it to (see above) and find the line that reads:

tell application "Adobe InDesign CS5"

In this line, change the word CS5 to reflect the version of InDesign you use (CS3, CS4, CS5.5, CS6, etc.), then save the script (S). That’s all there is to it — you can close the AppleScript Editor now.

Removing Catchword Generator

Open the finder, navigate to the folder mentioned above, and drag the file Generate Catchwords.scpt to the trash.

Using Catchword Generator

To run the script on a document, use InDesign to open the document in which you want to generate catchwords. Then open the Scripts panel by going to the menu Windows → Utilities → Scripts (the default shortcut for this is F11). If necessary, expand the Users folder shown in the Scripts panel, and then double-click on Catchword Generator.scpt. This brings up a window with the following options:

Style for text frames and paragraphs
A list of all object styles in the document, plus the default value (see below) if that does not exist yet. This is the name that will be used for the paragraph and object styles of the catchword; if one or both do not exist yet in the document, they will be created.
Default value: Catchword (English); Bladwachter (Dutch)
Text frame height
A box in which to enter the height for the text frames containing the catchwords. The width of these frames will be the same as that of the frame the catchword belongs to.
Default value: Point size of paragraph style Catchword (or localised name of that), converted to the unit used as vertical measurement in the document
Create catchwords on
Use this to select which pages to put catchwords on: all, only the left, or only the right pages of spreads.
Default value: All pages
Add catchwords when new paragraph begins in next text frame
When adding catchwords to aid the reader, you may only want to include them for paragraphs that are split between two text frames, and not if a new paragraph begins in the next frame. When this box is checked, catchwords will be added to all text frames, not just the ones that have a paragraph running on into the next frame (having a catchword under each frame is probably more historically accurate).
Default value: True
Group catchword frame with parent text frame
Checking this box will create a group for each catchword frame and the text frame it belongs to.
Default value: False
Delete existing catchword frames
When this box is checked, all text frames whose object style is the name selected in the drop-down list, will be deleted from the document. This way, you will not end up with multiple catchwords for the same text frame if you run Catchword Generator more than once. Note that this only works if you use the same style name as the last time you ran Catchword Generator!
Default value: True
Do not add catchwords (delete existing only)
Check this box together with the one above in order to delete all catchword frames in the document, without adding new ones.
Default value: False

Alter the options as desired, then click the OK button to run the script, which will add catchwords to each text frame that is threaded to another text frame which contains text. Text frames that are not threaded will not get catchwords, and neither do frames that are threaded to empty frames.

Note that when a page has more than one threaded text frame on it, each of these frames will get a catchword. This is historically incorrect but (probably) impossible to avoid, because Catchword Generator cannot determine if a text frame is the main one on the page or not. If this creates more catchword frames than desired, the best recourse is to manually delete the unnecessary ones.

Historical Notes

The reason why in Europe, historically, catchwords were added to pages is a source of some debate. One theory is that they were there to aid bookbinders: by printing the first word of the next page, they could more easily get the pages in the right order. The other common theory is that they were there to aid in reading the page, especially when doing so out loud for an audience; this way, the reader would already know the word on the next page before turning it over, thereby preventing pauses in the narration. This second explanation is supported by the fact that catchwords were more common in Protestant countries than in Catholic ones. Whatever the case may be, they were in fairly common use in the sixteenth, seventeenth and eighteenth centuries, but died out in the nineteenth — probably because the concept had proved unnecessary.

Even when they were in common use, the exact way to employ catchwords was never standardised to any real degree: some printers added them to every page, others only to the left-hand pages (the reverse or verso of each leaf), and some only to the last page of each signature. On the other hand, there are examples of catchwords being used even on prints that take up only two sides of a single sheet of paper.

Catchwords are apparently not uncommon even in modern printings of the Quran and other Islamic texts, however, because they help the reader in following the flow of the text.

See this article (in Dutch) for much more in-depth information about the historical use of catchwords.

So Why This Script?

If catchwords aren’t used anymore, why create Catchword Generator? Largely because I had a need for it when designing the layout of a document that is supposed to resemble a seventeenth-century book. While doing research for this, I came across catchwords and decided that including these would make the document appear a lot more authentic. Probably due to them hardly ever being used anymore, though, InDesign does not have a built-in mechanism to retrieve words from following pages (unlike, for example, getting the first or last word of the current spread to use as running headers) and there is no hack (1 or 2) to make it do this, either. The only recourse was to dive into scripting InDesign, with the end result being the Catchword Generator.

Why Mac-Only?

Because I work on a Mac, and found AppleScript to be easier to do this in than JavaScript. If you want to, though, you should be able to port Catchword Generator to JavaScript fairly easily — AppleScript is not difficult to read, so even if you’ve never seen it before you can probably work out what it does and how it does it.

Contacting the Author

The author can be e-mailed at <jakko@xs4all.nl>.

Translating Catchword Generator

Catchword Generator is currently localised in Dutch and English — that is, it will display dialogs in Dutch if your system language is set to that language, and English dialogs in all other cases. However, more languages would be nice to include, so anyone who feels like translating the captions displayed by the script is more than welcome to do so. Please contact the author if you are interested in helping out!

Version History

Known Issues

Known Non-Issues

Licenses

Catchword Generator and its documentation may be distributed and modified as described in the following sections.

Catchword Generator (that is, the script)

Catchword Generator — script to add catchwords to pages in Adobe InDesign.

Copyright © 2012 Jakko Westerbeke

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Catchword Generator Documentation (that is, the text you are reading right now)

Copyright © 2012 Jakko Westerbeke

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

A copy of the license can be found on the GNU web site.