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.
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.
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.
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:
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.
Open the finder, navigate to the folder mentioned above, and drag the file Generate Catchwords.scpt
to the trash.
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:
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.
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.
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.
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.
The author can be e-mailed at <jakko@xs4all.nl>.
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!
selected index
of this drop-down, which is zero-based, to determine the style the user wants. AppleScript, though, uses one-based lists, but this is obviously no problem: add 1 to selected index
and you’re good to go. However, For a very strange reason I can’t figure out, when the last item in the drop-down is selected, selected index
returns the length of the list rather than the item’s index … In other words, if the drop-down contains four items, they seem to be numbered 0, 1, 2 and 4 — rather than 0, 1, 2 and 3 as you would expect. Naturally, adding 1 to selected index
will cause an error if the user selects the last item in the list, while not adding 1 makes the problem worse by likewise causing an error if the first item is selected, but also selecting the wrong item in all other cases. (The solution is to check if selected index
is equal to the length of the list, and if not, to add 1 to it. This should not be necessary, though.)try … on error … end try
blocks by proper if … else … end if
checks. (Amazingly, Adobe’s own scripting guide advocates using try
statements, which is why they were originally in this script — I at first figured it wouldn’t be possible to actually check if things like a given object style already exists in the active document. It is.)end
statement belongs to (useful because AppleScript Editor has no code-folding ability).english locale
.
Catchword Generator and its documentation may be distributed and modified as described in the following sections.
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/>.
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.