Skip to main content
dublove
Legend
May 9, 2026
Question

Is there a script that can inherit only specific settings from another style?

  • May 9, 2026
  • 4 replies
  • 35 views

For example:
Paragraph style A inherits only certain Grep settings from paragraph style B.
Or, the “Paragraph Line” setting in A inherits from B, while other settings remain unrelated to B.


Currently, I usually start by basing Style A on Style B, then modify it item by item.
However, sometimes when Style A is based on Style B, many things change, and you have to start over from scratch.

 

Sometimes, cell styles and object styles also require this functionality.

This is different from importing styles from another document.

    4 replies

    dublove
    dubloveAuthor
    Legend
    May 9, 2026

    Hi @Peter Kahrel, Help,please.

    About grep_query_manager.jsx

    How to make this sentence include subdirectories (such as the "00paraGrep" directory)
    Enable the display of .xml files and the paraGrep folder here。

    I hope to manage regular expressions in groups.

     

    Thank you very much.

    Like this:

    //DESCRIPTION: Manage and execute GREP queries
    // Peter Kahrel
    // https://creativepro.com/files/kahrel/indesign/grep_query_manager.html


    //line84

     var scriptFolder = script_folder();
     var queryFolder = app.scriptPreferences.scriptsFolder.parent.parent + '/Find-Change Queries/Grep/';

    //line343

    var queries = Folder (queryFolder).getFiles ('*.xml');

     

    Community Expert
    May 9, 2026

    As I said I don’t apply multiple grep style to multiple styles as it slows down indesign too much when text reflows, so I’ve never researched a solution you’re looking for as it’s counter-productive to a workflow. 

    When I make a style with GREP styles I base every other style off this carefully. 

    For example 
    Body Text

    And every other style is based on this. 
    Except when say I have an indent level 2 - then that’s based off indent level 1 - which is based off Body Text

    So I can change Body text and it cascades to level 1 and level 2

    I can make a change to level 1 whcih cascades to level 2 

     

    Careful style management has always been my way of proceeding. 

     

    Again, I stay far away from many GREP styles across many styles. 

    I much prefer a blanket set of GREP find and replace at the end.

     

    That’s just me though.

    dublove
    dubloveAuthor
    Legend
    May 9, 2026

    Hi Eugene Tyson.

    Thanks.

     

    Unfortunately, it can only replicate Grep
    It would be great if we could replicate other settings.

    Does “Multi-Find Change” seem to have an open-source version?


    This has been shared before.  by @Peter Kahrel

    https://creativepro.com/files/kahrel/indesign/grep_query_manager.html
    I didn't study it carefully, but now I find it has this function.

     

    I just took a closer look at grep_query_manager.jsx and realized that I can save the Grep query.
    It's a bit unfortunate that it doesn't support reading directories under the GREP path, like this: Find-Change Queries\GREP\00ParGrep\


    I want to place all the Grep used in paragraph styles in a unified directory.
    If combined with Grep used in the search dialog box, it would be too crowded and messy.

    Community Expert
    May 9, 2026

    I typically deal with long documents so I tend to avoid GREP styles as many GREP styles, especially across different styles tend to slow down document reflow. 

    I use a Multi-Find Change plugin - that’s free now - https://creativepro.com/multi-find-change-is-now-free/

    And run a series of GREPs at the end of the document changes. 

    ---
    But there are some scripts out there
     

    https://www.brandwares.com/bestpractices/2013/11/indesign-javascript-copying-grep-styles/

     

    https://creativepro.com/topic/copy-grep-styles-from-one-paragraph-style-to-another/