www.nickhodge.com

microsoft, munging and on being a mercurial iconoclastic professional geek.

InDesign 2.0: Automating Adding Words to the Dictionary

without comments

InDes­ign 2.0: Auto­mat­ing Adding Words to the Dictionary

Updated for InDes­ign CS: Import Words into InDes­ign CS Dic­tion­ary

A ques­tion from a cus­tomer: how do you import dic­tion­ar­ies into InDes­ign 2.0?

There are two real axioms about work­ing for Adobe. (a) there is always someone smarter than you who can help (b) InDes­ign is scriptable.

By doing a Euc­lidean join of these axioms, I was able to solve the prob­lem. Thanks to Olav from Adobe in Seattle for the cod­ing. What Olav turned around in hours would have taken me days. Essen­tially what he has cre­ated is a little Visual Basic applic­a­tion that will import a text file of words into the excep­tion dic­tion­ary of InDes­ign. This dic­tion­ary is attached to a spe­cific lan­guage dictonary.

Down­load the ZIP file con­tain­ing the IDAddWords applic­a­tion: InDes­ign 2.0 Dic­tion­ary Script

[1102] 01 addwords zip contents

This .zip file con­tains the source code (frm) and Visual Basic Pro­ject (vbp) If you do not have Visual Basic, it is also sup­plied as a .exe. Just Unzip the con­tents anywhere.

Double click­ing on the .exe, you will see the fol­low­ing screen:

[1103] 02 initial screen

The Lan­guage: popup allows you to select which lan­guage dic­tion­ary you would like to insert the words into.

The Add Words but­ton allows you to select a text file that con­tains a word per line, this file con­tains the extra words you would like to add to the cur­rently selec­ted Lan­guage: InDes­ign dic­tion­ary. It will prompt you for a text file, and the words inside this file will be inser­ted as excep­tions into the Lan­guage: InDes­ign dictionary.

The text file would look like the fol­low­ing in Note­pad or similar:

[1104] 03 text file in notepad

Remove All removes all excep­tion words (not the ori­ginal words sup­plied by InDes­ign in the Dictionary).

View Word List allows you to view the excep­tion words in the cur­rent Lan­guage: InDes­ign dic­tion­ary in the scrolling panel.

Save Word List will save a text file; a word per line, of the cur­rent excep­tion words in the dictionary.

Please note (from the InDes­ign 2.0 Online Help Files:)

By default, hyphen­a­tion and spelling rules are based on the dic­tion­ary for the lan­guage spe­cified for the text. When you cus­tom­ize the words in a dic­tion­ary, you actu­ally cre­ate excep­tion lists of added words (words that aren’t already in the dic­tion­ary) and removed words (exist­ing dic­tion­ary words you want InDes­ign to ignore).

By default, hyphen­a­tion and spelling excep­tions are loc­ated only in user dic­tion­ary files stored out­side the doc­u­ment on the com­puter where InDes­ign is installed (dic­tion­ary file­names end with the exten­sions .udc and .not). How­ever, you can also store excep­tion lists inside any InDes­ign doc­u­ment. In addi­tion, you can spe­cify that the text-composition engine com­poses text using the word list stored in the external user dic­tion­ary, the word list stored in the cur­rent doc­u­ment, or both. Spe­cify stor­age and com­pos­i­tion set­tings in the Dic­tion­ary panel of the Pref­er­ences dia­log box.

Written by Nick Hodge

April 2nd, 2002 at 10:00 am

Posted in mungenet