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

Keeping it all together

New Here ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

Hi. So I'm stuck and any pulling my hair out looking for a solution. Any help would be great!

I'm working with a a fairly long document (500+ pages) in English and Franch languages.

In French, a space is required both before and after all two- (or more) part punctuation marks and symbols, including : ; « » ! ? % $ #

Seeing that there is that space (in this text it's just a regular space) how can I avoid a line starting with one of the characters (! ? « ») or having a « left alone on a line?

 

Screen Shot 2023-01-23 at 13.27.24.png

 

I hope I was clear enough in my question. ty 😉

TOPICS
How to

Views

273

Translate

Translate

Report

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 ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

You could do it with tracking.

  1. Create a character style where tracking is set to 200 (or any better value)
  2. Make in your basic paragraph style a GREP style and select the character style.
    «(?=.)|.(?=»)​

Votes

Translate

Translate

Report

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 ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

No space is required here.

Votes

Translate

Translate

Report

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 ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

In French, a space is required both before and after all two- (or more) part punctuation marks and symbols, including : ; « » ! ? % $ #

Actually, it's a little bit more complicated: French typographic rules use a thin space before the question mark, the exclamation mark and the semicolon (! ? 😉 and a fixed width nonbreaking space before the colon (:), percent sign, currency signs, a closing quote (») and after an opening quote («).

You can run different find-change to replace the existing spaces by either thin spaces or fixed width non breaking spaces

Capture d’écran 2023-01-23 à 14.20.05.pngCapture d’écran 2023-01-23 à 14.20.24.pngCapture d’écran 2023-01-23 à 14.20.48.pngCapture d’écran 2023-01-23 à 14.21.20.pngCapture d’écran 2023-01-23 à 14.21.36.png

 

You also can run a GREP find change to find in a single search question markks, exclamation marks and semicolons or percent sign, currency signs and other.

Votes

Translate

Translate

Report

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 ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

Much thanks for the replies.
 
Would there be a GREP style to search/find instances where these punctuation characters are out of line or hanging alone on new line or end of line? How do you keep them with the text they are punctuating?
Any idea of a style to apply to keep this from happening?

Votes

Translate

Translate

Report

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 ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

To replace ordinary spaces by thin spaces before ; or ? or !

Find

(?=[?!;])

 

Replace by

~<

 

To replace normal spaces with fixed width non breaking spaces before :, €, $, %

Find

(?=[$€%])

 

Replace by

~s

 

To find an ordinary space following an opening quote: 

(?<=«) and replace by ~<

To find an ordinary space followed by a closing quote: 

(?=») and replace by ~<

 

How do you keep them with the text they are punctuating?

These spaces are non breaking spaces, so they automatically will be kept with the following signs.

Votes

Translate

Translate

Report

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 ,
Jan 23, 2023 Jan 23, 2023

Copy link to clipboard

Copied

LATEST

Yes, changing the spacing types was the key. I should have thought of that but I didn't.

Changing spaces to non breaking spaces is just what I needed to resolve the issue of these hanging punctuation symbols. Thank you!

Votes

Translate

Translate

Report

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