Pages: Line breaks vs. paragraph breaks

Posted by Pierre Igot in: Microsoft, Pages
March 3rd, 2005 • 6:04 am

A few weeks ago, I noted that finally, with Pages, we have a word processor whose default body text style includes space after.

I think it’s a good idea. It’s the way most people want their text (with spacing between paragraphs), and in other word processors they create such spacing artificially by using double return characters. (Worse still: When they find that the double return creates a space that’s too big for their liking, they select the empty paragraph and apply a lower font size to it in order to reduce its height! Sad but true…)

Still, it could create some new problems, especially when it comes to copying text from other applications and pasting it into a Pages document.

The typical example would be a mailing address. Say somebody send you an e-mail with the following mailing address:

Pierre Igot
P.O. Box 333
Church Point, NS

(Not my real address. :-))

In e-mail programs, the “line breaks” between each line of the mailing address are actually regular return characters, which will translate into paragraph breaks when copied and pasted into a word processor, right?

That’s where it becomes interesting.

If you select the above address and copy it and paste it into a Pages document in which the default body style has some space after, you don’t get any space after between the lines of the address.

How is this possible? Unfortunately, it’s not because word processors have suddenly become extremely smart about guessing what you are trying to achieve. It’s because, by default, what gets pasted into your word processor is not plain text, but formatted text. And that formatted text includes paragraph formatting information such as the space after each paragraph.

By default, when you copy text from an e-mail message in Mail, even if you are not using formatted text (a.k.a. “rich text”) in your e-mail, Mail will still include character and paragraph formatting information, including the font face, font size, and paragraph spacing.

In truth, it’s a rather dumb behaviour, because the character formatting information that it copies is actually based on your default font face and size for reading e-mails. In my case, it’s Optima 14 point, which means that, whenever I copy text from an e-mail message, even if the e-mail message is in plain text with no formatting, the text in the Clipboard is formatted using Optima 14 pt and when I paste it into a Pages document it’s in Optima 14 pt, which is really not what I need.

But the important thing here is that in this pasted text, the paragraph formatting specifies that the paragraphs should have a space after value of 0 point. That’s how come the address has no space after between each line, even though it’s pasted into a document whose default style includes 12 points of space after.

Unfortunately, as soon as you strip the manual font and paragraph formatting from this pasted text so that it matches the default formatting of the rest of your Pages document, the default paragraph spacing is restored, and you will get 12 points of spacing between each line of your mailing address.

How can this be avoided? Well, unfortunately, the only way is to replace the return characters that separate each line of the mailing address from the next with line breaks (shift-Return in Pages).

That’s where Apple could show that it really does get word processing better than Microsoft does. Instead of requiring the user to do this, it could include a command that automatically replaces return characters with line breaks in the selection. (Or even guess that, in such situations, replacing return characters with line breaks is the smart thing to do, automatically.)

This could probably be achieved with an AppleScript — but, unfortunately, at this point, Pages doesn’t support AppleScript scripting (whereas Keynote, the other half of the iWork suite, is scriptable).

So we are stuck with having to insert the line breaks manually after the fact.

I am used to this. I have been doing it in Word for years — because Word is just as dumb as Pages when it comes to text pasted from Mail.

It’s interesting to note, however, what happens when you copy and paste from a web page into Pages and Microsoft Word. It totally depends on how the text is formatted in the web page itself.

If you take the example above (the mailing address), you will see that, if you select that address, copy it, and paste it in either Pages or Word, you get formatted text with return characters between each line and no spacing between the lines (i.e. no space after in the paragraph formatting).

But now take the following example:

Pierre Igot
P.O. Box 333
Church Point, NS

It’s the same address, but formatted using the web equivalent of a line break, which is the <br /> tag. Select this text, copy it, and paste it into a Pages documents. And then make the invisible characters visible. See what happened? Pages replaces the <br /> tags with proper line breaks!

On the other hand, if you paste the same text into a Word document, the font formatting is preserved, but the line breaks are completely lost and Word uses… spaces instead, which means that the entire address becomes a single paragraph with no breaks! Ugh.

So that’s at least one thing that Pages does better than Word. And it’s probably due to the fact that both Pages and Safari support Unicode properly and probably use the proper Unicode character for a line break. Word’s Unicode support, on the other hand, is still only skin-deep, even in Word 2004.

Still, this doesn’t solve our problem with text copied from Mail. Ultimately, I suppose that Apple would say that the solution is to use formatted text in e-mail as well and to use the proper Unicode character for line breaks in e-mail too.

The problem is that this is still a completely unrealistic proposition at this point in the time, and will remain so for many years to come — simply because a lot of e-mail is still in plain text with no formatting, and people using Unicode for character encoding in e-mail are still a very small minority.

In the mean time (until Unicode becomes really universal), it seems to me that Apple could help alleviate the problem by at least including a command to strip formatting and replace paragraph breaks with line breaks when appropriate.

One Response to “Pages: Line breaks vs. paragraph breaks”

  1. Olivier says:

    (Or even guess that, in such situations, replacing return characters with line breaks is the smart thing to do, automatically.)

    No, guessing is evil. See Word’s Fool-based interference engine.

Leave a Reply

Comments are closed.