Skip to main content
Participant
February 6, 2023
Question

Forced line break at the end of specific characters

  • February 6, 2023
  • 2 replies
  • 204 views

Hi there I work with Scottish Gaelic language everyday. And there is a rule that there can't be any apostrophes left on the end of paragraphs.

For example this:

Tha mi a’
dol a cheannach
would have to change to this: 

Tha mi a’dol a cheannach

Its frustrating because I have to search all of my documents at the end and add in forced line breaks to any that are overhanging. I was wondering if there was a Grep style I could apply to stop overhanging apostophes and recognise that they can't break away from the following word (very similar to hyphenation).

This topic has been closed for replies.

2 replies

James Gifford—NitroPress
Legend
February 6, 2023

Seems like a simple search for [apostrophe][paragraph return] (replace with just the apostrophe) would do it, without any need for GREP or more complex approaches.

 

John Mensinger
Community Expert
Community Expert
February 6, 2023

There are probably more elegant ways to do it and account for possible exceptions, if there are any, but I'd try adding a GREP style to the primary Paragraph Style that applies NO BREAK (a Character Style that does nothing but apply the No Break attribute) to all instances of [appostrophe][space][wildcard:any character].

 

 

 

Participant
February 8, 2023

Thank you! This worked perfectly