Never Break-up on a Date… or a name… or a time…

In issue of 52 of InDesign Magazine, Sandee Cohen provides a brilliant and simple solution to a problem that many designers face – how to control widows and orphans on paragraphs (this is separate to page-defined widows/orphans). Download the issue to read about this handy tip.

Her advice is great, but can go one step further. Her solution can be adapted to not just fixing paragraph widows/orphans, but also any situation where a type should not break, such as:

  • Dates (e.g. 31 July)
  • Names (Mr John Citizen)
  • Times (4.00 pm)

The example here is an article about the Adelaide Phenomenon known as “Mad March”. The dates at the end of the article are breaking, and so is an individual’s name. These have been highlighted in Magenta to illustrate what needs to be fixed.

shot1

Part of Sandee’s fix, without revealing her magic trick, is to create a unique character style that only has the “no-break” attribute turned on and everything else left off.

shot2-first

The paragraphs in this text have a paragraph style applied that will undergo some GREP style magic. To do this, the paragraph style has to be edited, particularly the GREP styles portion of the dialog box.

shot2

Firstly, the dates have to be fixed. Click the “New GREP Style” button and select the “no-break” style that was made earlier, and then in the “To Text” field, type the following:

\d+\s(January|February|March|April|May|June|July|August|September|October|November|December)

This will look for any number followed by one space and followed by any month written in full. Anything that matches this will now have the “no-style” applied. Don’t click OK just yet, but click once in the grey box just underneath the field that was just typed to refresh the page.

shot3

Fixed. Now let’s fix the name Mr Paul McDermott. Still in the same window, click the “New GREP Style” button again, again using the “no-break” style, but this time in the “To Text” field, type the following:

(Mr|Mrs|Miss|Ms|Dr|Sir)\s[\l\u]+\s[\l\u]+

This will look for any name that has a title, initial or name, and surname. Yes, this is a basic GREP code and a better one could be written to encompass all sorts of names, but for this demonstration it will do. Click OK.

shot4

Voila! All fixed. The advantage with using these GREP style fixes as opposed to using non-breaking spaces or forced line breaks is that if the copy changes for whatever reason, many of the forced breaks don’t have to be removed. Non-breaking spaces are a hassle so if they don’t need to be made, why bother?

shot5

This article has focused on two instances where a no-break character style (with some GREP style magic) can keep names and dates together, but there are other uses for this such as times, dollar values… the list is up to you. As usual to see how this was done, feel free to download the sample here.

Advertisements

About colmin8r
A prepress operator since 1997 specialising in Adobe InDesign.

4 Responses to Never Break-up on a Date… or a name… or a time…

  1. Pingback: Features or Speed… why not both InDesign? | Colecandoo!

  2. Amazing thank you, i have been after this for ages, but i also worked out if you want the year in, have the GERP style like so: \d+\s(January|February|March|April|May|June|July|August|September|October|November|December)+\s(2012|2013|2014|2015)

    Obviously you need to update the year as of when. Hopes this helps someone.

    • colmin8r says:

      I think I can improve on that GREP for dates. after the \s after the month, change the year bit to be (\d{2,4}) given that the date will either be written as YYYY or YY (e.g. 2014, 1972, 13, 14). There will be a follow-up to this story soon to focus more on removing “runt lines” once further information is to hand.

      • Thank you

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: