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

GREP issue

Community Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Hi.

I have a paragraph style with the following GREP setup. However, for it work, It requires I have a space before each underscore in my file name.

 

Is there a way to slightly alter the GREP to make it possible for the file to be named "Peter Zumthor_Zumthor Atelier_1986 01.jpg" and still have the automatic return and hiding of the underscore.

Screenshot 2023-02-01 at 13.25.34.png

Thanks!

TOPICS
How to , Scripting

Views

165

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

Community Beginner , Feb 01, 2023 Feb 01, 2023

Sorry, Basically that it is not possible to do the Apply style in the way I want without a space before the underscores. The space is essential to ensure the character styles are applied to the correct elements found using the GREP style.

Votes

Translate

Translate
Community Expert ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

With a GREP style you can't insert any text or codes such as paragraph breaks: al you can do it apply formatting. There are ways to set things up that suggest that characters were inserted or changed, but that's trickery with conditions and hiding character styles. I don't think that that would work for you.

 

You should probably use a GREP replacement.

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 Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Hi Peter,

Yeah I was reading that that is the case. That is why I was using a moving trick for the paragraph break. The underscore character style was set up with the following settings - 

Tracking: 10000

Horizontal scale: 1000%

That is how I was managing to do achieve the result on the right side of the image. However, as soon as I have removed the space before each underscore, the trick with the character style didn't work anymore. Instead it just did the GREP applying the invisble style, which is:

size: 0,1

Horizontal scale: 1%

Vertical scale: 1%

Character colour: NoneScreenshot 2023-02-01 at 13.44.03.png

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Clever! You force the paragraph to break on those spaces.

Maybe apply the underscore character style to the underscore. That seems to work fine when I try it.

Why do you use a GREP style for this, by the way? I think it just adds overhead.

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 Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Thanks, Got some help on it from someone on the forums, super helpful! 

Honestly, this just seemed to work, although this is the first time I am trying to automate my workflow in indesign. 

 

The project is collating a bunch of images, 350 into a book. Then we wanted to captions to be auto created based on file names. Plus we wanted each part of the file name on a different line. So that is how we landed on this solution. 

 

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 Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Screenshot 2023-02-01 at 14.49.31.png

Sorry forgot to add the images. These are the types of files we have. and this is how we wanted it to end up looking 

Screenshot 2023-02-01 at 14.49.18.png

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
Advisor ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Aha! This thread really remembers something!!!

 

(^/)  The Jedi

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 Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Thanks again!

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Some details, maybe?

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 Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

LATEST

Sorry, Basically that it is not possible to do the Apply style in the way I want without a space before the underscores. The space is essential to ensure the character styles are applied to the correct elements found using the GREP 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