Pages 1.0.x: How to add a language setting to a character style

Posted by Pierre Igot in: Pages
October 11th, 2005 • 11:42 am

In spite of its (relatively) simple appearance, Apple’s Pages is a word processor with a pretty decent feature set.

For example, when you open the “Styles” drawer on the side of a document window, only a list of paragraph styles is visible by default. But it doesn’t mean that Pages only supports paragraph styles. It also support character styles. You just need to click on the small “a” button at the bottom of the drawer to make the list of character styles visible as well. (And you can also create a new Pages template for which the list of character styles is visible by default. The visibility of the character styles list, like the visual aspects of a number of other things in Pages, is document-specific and is saved along with the document when you save it.)

An important feature for me as a professional translation is support for multiple languages. Here again, even though it might not be immediately apparent, Pages does have pretty extensive support for multiple languages, just like Mac OS X itself and most recent Apple applications.

At the most basic level, in Pages “Language” is an option accessible under “Text › More” in the inspector palette. There is a pop-up menu where you can choose from a list of available languages.

But this interface doesn’t tell you much about language support in Pages. For one thing, is language a paragraph-level option or a character-level option? Other options in that same pane in the inspector palette are paragraph-level options (such as “Keep lines together” and “Keep with following paragraph“).

But if you experiment a bit with the language option, you’ll soon find out that it is indeed a character-level option, which means that you can mix multiple languages in the same paragraph in a Pages document. This is essential for me, because, as a translator in Canada, I constantly have to write documents in one of Canada’s official languages that refer to titles, organizations, etc. that only have a name in the country’s other official language.

For example, I often have to write French texts that refer to provincial legislation here in Nova Scotia, which does not exist in French. So I have to refer to the English titles of pieces of legislation in my French documents. Pages’ “Language” option does let me do this.

However, having to use this pop-up menu in one of the panes of the inspector palette is a bit of a pain. So one of the first things I checked when I started using Pages was whether I could incorporate a language setting into a character style definition. That was obviously the next level of proper support for multiple languages in Pages, but since it was a 1.0 application, I wasn’t so sure that it would already support this.

It turns out that adding a language setting to a character style definition is indeed possible, although it is not always as straightforward as it should be.

There is no problem when you define a character style from scratch. Let’s say you have a paragraph of text with no character-level formatting. This paragraph of text is in a body text style called “Body,” and it is in French, but it contains a document title that is in English. So you want to put this English title in italics and assign the “English” language setting to it. And you want to define a character style based on these formatting options, so that you can format other English titles easily after that.

It’s easy. Select the English title. Bring up the “Font” palette and apply italics to the selection. You’ll notice that the little down-pointing triangle next to the “Body” paragraph style in the Styles drawer has now turned red. This is meant to indicate that the current selection is in “Body” paragraph style, but additional formatting options that were added after the application of the paragraph style. If you wanted to add the manually added formatting options to the definition of the paragraph style itself (which we do not want to do here), you would click on that red triangle and one of the options would be to “Redefine Style From Selection,” which would do exactly that.

I am not sure why Pages doesn’t also change the down-pointing triangle next to “None” in the list of character styles into a red triangle—but it doesn’t. This does not mean that you cannot click on it, and if you do, you’ll see an option to “Create New Character Style From Selection…” In other words, the character style section of the Styles drawer is indeed aware that manual character formatting options (the italics in this case) have been applied to the selection, even though the triangle is not red to reflect this.

Anyway, before we want to create a new character style, we also want to change the language of the selection. In order to do this, you go under “Text › More” in the inspector palette and, in the “Language” pop-up, select “English.”

The triangle next to “None” in the list of character styles still doesn’t turn red. But your selection is now in italics and in English, whereas the rest of the paragraph is in roman and in French.

Now it’s time to click on that triangle and create a new character style. When you choose that option, a dialog sheet drops down. It invites you to type the name of the new character style, and then has a collapsed section with the heading “Include all character attributes.” Click on the triangle next to the heading to expand that section. The heading changes to “Include these character attributes,” and you will then see a list of all the character formatting options that Pages is about to include in the definition of the new character style that you are in the process of creating.

And there you’ll see that “Language” is indeed one of the formatting options that is about to be included in the character style definition.

If all you want in the style definition is the italics and the language setting, then you’ll want to click on the “Deselect All” button to deselect all formatting options, and then just click on the checkboxes for the two options that you do want to include, i.e. the italics and the language option.

Then click on “OK” and you’re done! You now have a new character style whose definition only includes two things: “Italic: On” and “Language: English.” And you can use this character style to format all English document titles in your otherwise French document.

Now, what happens if you want to add a language setting to an existing character style? Let’s say you have already defined a style called “English Document Title,” but the only formatting option included in the definition of that style is “Italic: On.”

Here again, things work well. All you have to do is select the text of the title, apply the “English Document Title” character style to it, then go under “Text › More” in the inspector palette and, in the “Language” pop-up, select “English.”

As soon as you do this, you’ll notice that the triangle next to the “English Document Title” character style in the list of character styles has turned red. You can then click on that triangle and choose “Redefine Style From Selection.”

Now the definition of your “English Document Title” character style will include both “Italic: On” and “Language: English.” (You cannot verify this by editing the style definition, because Pages provides no interface for editing style definitions. The only way you can make sure that the change has occurred is to apply the character style to another selection and see if the language changes automatically as expected.)

There is, however, one scenario where things don’t always work as expected in Pages, and that is if you try to update an existing character style with a new language setting when that character style is used within a paragraph that is also formatted with a list style. (List styles are a separate type of style in Pages, which I have had the opportunity to discuss here.)

Say you have a paragraph that is formatted using a list style (“Bullet,” for example), and this paragraph contains a document title that is formatted using the “English Document Title” character style, but the character style does not include the language setting to it yet and you want to add the setting to the character style definition using the procedure described above.

So you select, within the paragraph formatted with the “Bullet” list style, the range of text that is already formatted using the “English Document Title” character style. Then you go under “Text › More” in the inspector palette and, in the “Language” pop-up, select “English,” instead of the current “French” that applies to the entire paragraph.

Now check what happens. Sometimes—only sometimes: I don’t seem to be able to reproduce this reliably, but I have definitely had it happen to me several times—the triangle is red, but the option to “Redefine Style From Selection” is greyed out and you cannot use it. In other words, the red triangle indicates that Pages is indeed aware that your selection includes manual formatting beyond the formatting options that are part of the current style definition, but you cannot add these new manual formatting options to the style, including the language setting.

Like I said, I am not able to reproduce this reliably. It might not have anything to do with list styles, and might happen in other contexts. But I have definitely experienced situations where the triangle would be red, but Pages wouldn’t let me update the style definition. In such situations, obviously the only solution is to recreate the character style from scratch, which, in my experience, always works reliably.

As this post demonstrates, there is indeed quite a bit of power under that Pages hood, and it can be used for pretty advanced stuff, without too much difficulty (apart from the occasional flakiness).

Now if only Apple would release a Pages update that lets us define keyboard shortcuts for paragraph and character styles!


Comments are closed.

Leave a Reply

Comments are closed.