Pages ’09 Tip: Avoid automatic spacing when pasting text

Posted by Pierre Igot in: Pages
July 6th, 2012 • 3:15 pm

One of the long-standing annoyances with computer software in general and Mac OS X software in particular is that, after all these years, there is still a strong American bias in many features. While Mac OS X is of course a multilingual OS and supports a number of “international” features, there are still system-wide or application-specific behaviours that betray the biases of English-speaking engineers.

One such example concerns the way apostrophes are handled in a word processor such as Pages ’09. In English, the apostrophe is mostly used for the possessive, i.e. at the end of a word (as in “the cat’s meow”). In French, on the other hand, the apostrophe is a very common symbol that is used for many contracted forms at the beginning of words: before a word that begins with a vowel or a “mute” h, le becomes l’, de becomes d’, etc. Most crucially, when this contraction occurs, the space between the contracted word and the following word is dropped — even though, grammatically speaking, the string of characters still consists of two separate words. (The same thing could be said of the contraction it’s in English.)

The first obvious sign of an English bias in Pages ’09 is that double-clicking on a French word with a contraction before it selects both the contraction and the word. In other words, if I have a French text containing “l’association” and I double-click on “association”, Pages ’09 selects “l’association”, i.e. assumes that it’s a single word when it is not. (BBEdit, on the other hand, is smart enough not to select the contraction l’. And it also only selects it in it’s.)

I once submitted an “enhancement request” to Apple via Bug Reporter about this problem in Pages ’09 and received a reply saying that it was a system-wide issue that was not up to the Pages developers. If the word processor developers are not capable of advocating for such a change by themselves, I guess there is little hope of any improvement.

What interests me here, however, is not this basic selection issue, but when happens when pasting text in Pages ’09 in a French document containing contractions. Say, for example, that you have a French text containing the contraction l’. You have copied a long name such as “Association des enseignants du Nouveau-Brunswick” in another application and you’d like to insert that name after the contraction.

Unfortunately, if you place your insertion point immediately after the apostrophe and press command-V to insert the copied text, even though your Clipboard contains no trailing space before the first word (“Association”), Pages ’09 assumes that it’s smarter than you are and automatically adds a space between the apostrophe and the pasted text, which is highly undesirable. And there is no way to turn off this “Smart Pasting” behaviour in Pages ’09 as far as I can tell.

(Even if there were a way to turn Smart Pasting off altogether in Pages ’09, as you can do in Word 2012, it wouldn’t be a solution, because there are many other situations where the insertion of an extra space is indeed desirable and convenient. It just isn’t desirable in this case, but since it is a French-specific issue, the Pages ’09 user interface would have to offer a French-specific setting, and that probably goes against Apple’s philosophy of keeping it simple at all costs.)

Here, as in many other situations, Keyboard Maestro comes to the rescue. It has a series of Clipboard “filters” that can be applied to the current contents of the Clipboard before pasting the text and I have found that, if I use a macro that applies the filter “Trim Whitespace” to the Clipboard before pasting it, even though there is no white space in my copied text to begin with, somehow this forces Pages ’09 to paste the text without an extra space between the apostrophe and the first letter of the pasted text.

Since I do want the extra space in other situations, I have kept the regular command-V shortcut for the plain vanilla “Paste” command in Pages ’09 (which adds the extra space in this case), and I have assigned the command-shift-V shortcut to my KM macro that trims the whitespace before pasting the text. Et voilà! I now have a way to paste text immediately after an apostrophe without having Pages ’09 add an extra space that I don’t want.

Of course, it forces me to memorize and use two different shortcuts, but it’s better than having to constantly backtrack after pasting text and manually delete the extra space that Pages ’09 has just inserted.

Comments are closed.