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

GREP keep/No break expression help

Community Beginner ,
May 25, 2018 May 25, 2018

Hello again! I love these forums - everyone is super helpful!

I am looking for answers, help, guidance etc on making a grep express that will keep the following pieces of text together:

Touch dry:  1 minute (+20 °C / +68 °F)  --> no break

and then a separate expression for:

Full Cure:  30 minutes (+20 °C / +68 °F) --> no break

I have tried copy/paste into the grep options box directly from the linked text file - but even that doesn't seem to help.

Pretty much I don't like how the text auto flows with the possibly of breaking those chunks of text. I would much rather at least have (in the attached screen shot) "full" start on the next line - but without any hard or soft returns. Using GREP/Character/Paragraph Styles. So it just automatically does it and I don't have to worry about again....

Screen Shot 2018-05-25 at 12.46.38 PM.png

Screen Shot 2018-05-25 at 12.47.01 PM.png

as always - any help or feedback would be fantastic!

-C

2.4K
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

correct answers 1 Correct answer

Community Expert , May 25, 2018 May 25, 2018

Your GREP expressions are not working because they contain characters that serve as functions in GREP.    ( + / )

In order to get GREP to read them as characters, you have to use an escape character before each one.    \

Like this:

\(\+20 °C \/ \+68°F\)

Screenshot 2018-05-25 15.52.13.png

Translate
Community Expert ,
May 25, 2018 May 25, 2018

Your GREP expressions are not working because they contain characters that serve as functions in GREP.    ( + / )

In order to get GREP to read them as characters, you have to use an escape character before each one.    \

Like this:

\(\+20 °C \/ \+68°F\)

Screenshot 2018-05-25 15.52.13.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
Advocate ,
May 25, 2018 May 25, 2018

Nothing against GREP, but couldn't you make a GREP Style that applies a No Break character style to these specific text strings?

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
People's Champ ,
May 29, 2018 May 29, 2018
LATEST

ou also can make a regular character style that sets the No Break. Then, just select the text you don't want to break, apply the style, and voila.

Benefit: No GREP programming/scripting needed. And you can use it anywhere on any text, even to control bad hyphenation breaks. It's flexible.

Drawbacks: it doesn't automate repetitive strings like a GREP style can.

Choose which method gives you the benefits you need.

NoBreak.png

|    Bevi Chagnon   |  Designer, Trainer, & Technologist for Accessible Documents |
|    PubCom |    Classes & Books for Accessible InDesign, PDFs & MS Office |
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