Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Forced line break at the end of specific characters

New Here ,
Feb 06, 2023 Feb 06, 2023

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).

TOPICS
How to , Type
203
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 06, 2023 Feb 06, 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].

 

JohnMensinger_0-1675698999043.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2023 Feb 08, 2023
LATEST

Thank you! This worked perfectly

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 06, 2023 Feb 06, 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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines