Textism
 

Using Grep to Find Caps  ::  MARCH 7

on the Macintosh provides excellent support for Grep searching, but for the time being I’ll focus on Word, given its de facto ubiquity as a text editor on both Windows and Mac.

Now, being the droll, sophisticated urbanite you are, you’re aware that abbreviations and acronyms appearing within bodies of text, such as NAFTA and RCMP are ANNOYING and DISRUPTIVE, robbing your droll, sophisticated ass of a pleasant reading experience. The solution is to set these in small caps, whereupon RCMP and NAFTA become far more AGREEABLE and less IRKSOME. Note that many designers think of small caps as a stylistic nicety, ignoring their practical contribution to the goal of an approachable, even body of text – a goal that predates the arrival of the plucky desktop publisher by several hundred years.

Let’s say, however, you have 80,000 words to deal with. Combing through for every required change to small caps is a huge task, not least because, heaven forfend, you’d have to read the damned thing.

Enter Grep, which in Word comes into play as “Use Wildcards.” This allows for the search of, among other things, ranges of characters, like A–Z, or a–z. Ideal for searching for strings of capital letters, which is the goal here. So, to find every instance of three or more adjacent capital letters, type this into the Find dialog, remembering to turn Use Wildcards on:

[A-Z][A-Z][A-Z]

Square brackets represent a single occurrence of the range they enclose: in this case A–Z and nothing else. This search string will take you directly to every string of capital letters that number three or more, at which point you can quickly take the steps to convert to small caps: select the whole range, convert to lowercase (in Word for Mac you can change case quickly by hitting command-option-c), then change to the ancillary small caps font. (Note that hitting the “Small Caps” button in the Format dialog is not the same thing at all, of which more later).

Next up: Pattern Matching Saves Lives.

 

BACK TO TEXTISM