How to shade characters but not spaces

Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

I'd like to create a paragraph style or even character style, if appropriate, where the text characters have a background color, but the spaces are unformatted space. Something like this effect:

 

2021-12-13_17-50-02.png

 

I can't figure out how to shade only the non-space characters. I have a GREP style in play that can detect and modify the character style, but I can't figure out how to shade only the non white spaces.

 

Any help is appreciated!

 

TOPICS
How to , Type

Views

165

Likes

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

correct answers 1 Correct answer

Adobe Community Professional , Dec 13, 2021 Dec 13, 2021
For example \S+ character style underlined, thickness > font height with a negative offset

Likes

Translate

Translate
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

For example

\S+

character style underlined, thickness > font height with a negative offset

Likes

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
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

quote

For example

\S+

character style underlined, thickness > font height with a negative offset


By @pixxxelschubser

 

OK, with this, I think I'm on the right track! I knew there had to be a trick to the shading, I didn't think of ultra thick underlines! and with a little extra GREP tweaking, I can pick up a single space before and after the characters so there's a bit of a border.

 

Thanks!

Likes

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
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

I think the GREP style is your only option. I don't think ID has any option to exclude style from whitespace. Interesting notion for an option but I think the need is so slight (except for certain types of art/display type) it's not likely to happen.

|| Word & InDesign to Kindle (& EPUB): a Professional Guide (Amazon)

Likes

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
Contributor ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

Create a character style with a custom underline. Apply that character style to any letter in the paragraph style.

Likes

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
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

Hi @davecourtemanche 

a good start. But for any grep style, it's useful to test it with a few examples. Try your own grep on a simple sample text like "my first $100,000.00".

 

What happens?

And what with \S+

Likes

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
Contributor ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

But he's doing chord charts. I mean, even jazz doesn't have any million dollar chords. 😄

Likes

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
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

@davecourtemanche 

Too bad. I'm afraid I don't get the joke. English is not my native language. And even worse, my English is not the best.

Likes

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
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

I've got it sorted, thanks to @pixxxelschubser 's suggestion. My regular expression is working just fine, the trick for me was to use the underline as the background. Thanks everyone for your help!!

!

Likes

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
Adobe Community Professional ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

Glad to hear that.

Just out of curiosity - what's your grep?

In my opinion, there are only two efficient notations for your requirements:

\S+

or

[^\s]+

Both Grep means the same.

Likes

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
Adobe Community Professional ,
Dec 14, 2021 Dec 14, 2021

Copy link to clipboard

Copied

Right now I'm using simply \w which matches all the "word characters" (letters, digits and underscore, but omits punctuation). This is working well. 

I considered \s\w+\s to pick up the spaces surrounding the word characters, but I think that underlining a white space doesn't create a visible underline (have to try that but I believe it will not highlight the white space). 

Likes

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 ,
Mar 22, 2022 Mar 22, 2022

Copy link to clipboard

Copied

spaces between sentences
Like

 

Likes

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
Adobe Community Professional ,
Mar 22, 2022 Mar 22, 2022

Copy link to clipboard

Copied

LATEST
quote

spaces between sentences
Like

 


By @janö58856049

 

???

Likes

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