Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Tip of the Week: De-Runt Your Paragraphs With a GREP Style

This InDesign tip was sent to Tip of the Week email subscribers on June 20, 2019.

InDesignSecrets Tip of the Week

Sign up now and every week you’ll get a new tip, keyboard shortcut, and roundups of new articles, plus exclusive deals sent right to your Inbox!

Just scroll down to the bottom of this page, enter your email address, and click Go! We’ll take care of the rest. Now, on with the tip!


Although you can control quite a few widow and orphan settings with InDesign’s Keep Option settings, one problem remains: a too-short last line (sometimes called a “runt”). Let’s assume you have a style rule that states the last line of a paragraph must contain at least 10 characters. The following GREP Style trick helps you follow that style.

1. Start by creating a Character Style called “no break” that only has the No Break option enabled.

2. Next, add a new GREP Style to your paragraph style, set the Apply Style pop-up menu to the “no break” character style you created earlier, then enter the following regular expression in the To Text field:
.{10}$ (That’s a dot-curly-ten-curly-dollar sign.)

Now any 10 last characters of the paragraph will never be broken.

Mike Rankin

Mike Rankin

Editor in Chief of InDesignSecrets.com, InDesign Magazine, and CreativePro.com. Author of LinkedIn Learning courses on InDesign, Illustrator, GIMP, Inkscape, and Affinity Publisher.
Mike Rankin

Latest posts by Mike Rankin (see all)

  • - November 30, -0001
Tags
Related Articles
Comments

5 Comments on “Tip of the Week: De-Runt Your Paragraphs With a GREP Style

  1. This GREP solution seems to apply to only whole words, not if a paragraphs ends with a short word (less than specified number of characters), correct?

  2. Hi Mike
    I always like your tips and tricks! This is a quick and easy winner.
    My friend Ariel Walden has a similar short Grep expression to apply a no break character attribute (which would be better than a style in such cases where the last word already has a character style like italics applied) and doesn’t count the punctuation as part of the equation (imagine if the last line had an ellipsis, period, quotation marks and closing paragraph symbol all together). see: https://www.id-extras.com/indesign-grep-to-avoid-runts/

Leave a Reply

Your email address will not be published. Required fields are marked *