To find the overridden paragraph directly and rename to a different paragraph style name

Community Beginner ,
Jun 28, 2022 Jun 28, 2022

Copy link to clipboard

Copied

Hi ! Can anyone guide me to identify the overridden paragraphs directly and rename to a different paragraph style name.

TOPICS
Scripting

Views

55

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
Community Expert ,
Jun 29, 2022 Jun 29, 2022

Copy link to clipboard

Copied

Hi @Saravanan RM ,

do you have any experience in writing scripts for InDesign with ExtendScript (JavaScript) ?

 

One could try to check every textStyleRange and use method textHasOverrides().

Available with InDesign CC 2015 version 11 and above. See:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#TextStyleRange.html#d1e509279__d1e517290

Or/and check property styleOverridden.

 

But of course there are practical issues.

No idea why you want to rename an applied paragraph style.

Can you tell in more detail why you want to do this?

The second thing: What would you like to do if there are different overrides in one single paragraph?

You'd need a custom written function to compare the overrides.

 

Regards,
Uwe Laubender
( Adobe Community Professional )

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
Community Beginner ,
Jun 29, 2022 Jun 29, 2022

Copy link to clipboard

Copied

Hi Laubender, Thanks for your reply.

I don't have any experience is scripting and please find my below comments on your queries

To rename applied paragraph style with override will be used to retain the local formating in the later stage while reimporting the xml(import using merge content option).

 

i.e. Each paragraph override has to use different name despite any number of local overrides.

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
Community Expert ,
Jun 29, 2022 Jun 29, 2022

Copy link to clipboard

Copied

LATEST

"i.e. Each paragraph override has to use different name despite any number of local overrides."

 

Hm. But doesn't that mean you need a duplicate of a given paragraph style with a new name for every override that is unique with a text style range? Note: A text style range is a consecutive range of text objects like a range of characters with exactly the same formatting.

 

Writing such a script is a huge task, I think.

Nothing one can do in a few minutes. So I would suggest you will hire a scripter for this.

 

Regards,
Uwe Laubender
( Adobe Community Professional )

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