Skip to main content
Inspiring
August 11, 2022
Answered

Special space

  • August 11, 2022
  • 3 replies
  • 403 views

 Is it possible to have an automatic special space (bigger than a regular space) before the diamond that dissapears when the diamond starts the line. 

This topic has been closed for replies.
Correct answer Laubender

Hi @yeshayac ,

you said: "…  that dissapears when the diamond starts the line. "

Every flexible space will do that automatically. The space will always land on the end of the line before.

We only need a GREP Style that is changing the width of a flexible space when the space is followed by a diamond.

 

Let's assume the diamond has the Unicode code point 25CA for LOZENGE, the GREP pattern for the blank character before could be done with a positive lookahead to the diamond character:

 

\x{0020}(?=\x{25CA})

 

Assigned a character style that will change tracking to e.g. 500.

 

From my German InDesign 2022 on Windows 10:

 

What's not clear from your screenshot is how the justification of your paragraph is defined and what characters exactly compose the white space around your diamond. Also the Unicode code point of your diamond is unknown. Select the diamond and look this up in the Info panel:

 

Regards,
Uwe Laubender
( Adobe Community Professional )

3 replies

LaubenderCommunity ExpertCorrect answer
Community Expert
August 11, 2022

Hi @yeshayac ,

you said: "…  that dissapears when the diamond starts the line. "

Every flexible space will do that automatically. The space will always land on the end of the line before.

We only need a GREP Style that is changing the width of a flexible space when the space is followed by a diamond.

 

Let's assume the diamond has the Unicode code point 25CA for LOZENGE, the GREP pattern for the blank character before could be done with a positive lookahead to the diamond character:

 

\x{0020}(?=\x{25CA})

 

Assigned a character style that will change tracking to e.g. 500.

 

From my German InDesign 2022 on Windows 10:

 

What's not clear from your screenshot is how the justification of your paragraph is defined and what characters exactly compose the white space around your diamond. Also the Unicode code point of your diamond is unknown. Select the diamond and look this up in the Info panel:

 

Regards,
Uwe Laubender
( Adobe Community Professional )

Peter Spier
Community Expert
Community Expert
August 11, 2022

it would certainly be possible to add a GREP style that would find spaces followed by the diamond and to change the horizontal scale of those spaces (GREP styles cannot change the glyph). I think that would do what you want.

Try /s(?=[your diamond glyph here])  You will need to create a character style (called wide space or whatever) that does nothing except change the horizontal scale under the advanced character formats.

Robert at ID-Tasker
Legend
August 11, 2022

I think GREP could do this - but I'm not an expert in creating expressions 😞