Skip to main content
kattoche
Participating Frequently
June 3, 2024
Question

forume grep

  • June 3, 2024
  • 4 replies
  • 479 views

Bonjour à tous

je ne me souviens pas de la formule Grep pour empêcher qu'un mot de 1 à 3 lettres par exemple soit en bout de ligne (comme à, de, une...)

Merciiiiii par avance et bonne soriée

This topic has been closed for replies.

4 replies

Mike Witherell
Community Expert
Community Expert
June 4, 2024

I did not know that!

Interestingly, I found these examples in other InDesign posts:

\b.{1,3}\b\K\s

as the Jedi posted, or maybe...

\b(a|an|the)\b\K\s

... and of course you would put in a string of common French tiny words instead of a|an|the.

The Change is applying the NoBreak Character Style in all these cases.

Mike Witherell
Mike Witherell
Community Expert
Community Expert
June 4, 2024

This is the custom in French typesetting? Not English?

Mike Witherell
jmlevy
Community Expert
Community Expert
June 4, 2024

This is the custom in French typesetting? 

For purists, yes… 

Mike Witherell
Community Expert
Community Expert
June 4, 2024

End of a *line*? oof da! I don't know that one, and my deeper question is ... why?

Mike Witherell
jmlevy
Community Expert
Community Expert
June 4, 2024

@Mike Witherell @In French, most of words with 1, 2 and 3 letters are either articles and prepositions and it is better to avoid to end lines with these words.

Mike Witherell
Community Expert
Community Expert
June 3, 2024

This simple GREP is for end of paragraphs to prevent short last lines:

 

Find what: 

.{16}$

Change to:

Apply character style NoBreak

Mike Witherell
kattoche
kattocheAuthor
Participating Frequently
June 4, 2024

thank you