is now part of CreativePro.com!

The Mystery of the Trailing Space Contest Answer and Winner

2

It’s time to reveal the solution—and the winner—for this month’s InDesignSecrets contest!

Here’s the scenario:  

You receive an InDesign document with text formatted in a Body Text paragraph style. The Body Text style includes a GREP style to prevent runts from occurring. You notice there are trailing spaces at the ends of some paragraphs, and decide to remove them to clean up the document.

InDesign trailing space mystery

When you delete some of the trailing spaces, the paragraph text completely rewraps.

InDesign trailing space mystery

In other paragraphs, removing the trailing space does nothing.

Why does the paragraph text sometimes rewrap when the trailing space is removed?

Solution: The culprit is the GREP style in the Body Text paragraph style. It was used to prevent runts from occurring by automatically applying a No Break character style to the last 9 characters of the paragraph.

The method is explained in this article about runts. It uses the GREP wildcard code for “any character”, which includes whitespace characters, like the trailing space.

So when that trailing space is removed, the range of characters where No Break is applied shifts one character earlier in the paragraph, which can cause the text to rewrap.

And the winner of this contest is…

Tuyen Pham

Tuyen wins 3 months access to videos of any 2 days of CreativePro Week 2017.

Thanks to everyone who entered, and be on the lookout for another contest with a new great prize next month!

Editor in Chief of CreativePro. Instructor at LinkedIn Learning with courses on InDesign, Illustrator, Photoshop, GIMP, Inkscape, and Affinity Publisher. Co-author of The Photoshop Visual Quickstart Guide with Nigel French.
  • Dwayne Harris says:

    I run a macro before I import text files and one of the things it does is delete a space before a paragraph return.

    I hate those spaces, mainly years ago a paragraph return would end up on a line of its own.

  • John Branchflower says:

    I find that when I use a drop cap paragraph style on an opening paragraph that ends with an extra space, the next para applies the next style correctly. If I then do a search and replace of ‘period space para’ as in your quiz to delete the space, the next paragraph is changed to a drop cap style. I wonder if your answer is related.

  • >