Map GREP styles from one Paragraph Style to another… or many!
December 5, 2013 Leave a comment
There’s no doubt that GREP styles are useful, but hiding the GREP style function within the Paragraph Style dialog box makes applying GREP styles difficult:
- Previously saved searches made in the find/change dialog box cannot be selected;
- GREP styles applied to one paragraph style cannot be easily applied to another existing paragraph style
Perhaps a GREP styles panel would be easier. The panel would be like any other panel available in InDesign, and would list the GREP searches by GREP style names (similar to Paragraph and Character styles). Upon double-clicking a GREP style, a dialog box would open and allow the style to be applied to one or many Paragraph styles at once, what Character style the GREP style should apply, and the ability to load previously saved GREP searches from the find/change dialog box (where appropriate).
Great huh? Well, there isn’t one. Perhaps enough people requesting such a panel on Adobe’s wishlist page might persuade the developers at Adobe make one… perhaps fix the footnotes feature at the same time – hint, hint!
Map GREP styles from one Paragraph Style to one or many Paragraph styles:
A combination of two scripts by separate contributors on the Adobe Forums allowed what I had not thought possible to become possible – select a paragraph style with the desired GREP styles, and then select multiple destination paragraph styles for the GREP styles to be applied. The script can be found here.
Similarly useful GREP style utilities
Peter Kahrel has a page dedicated to his various GREP utilities. Apart from having many GREP tools, his utilities accomplish other GREP style tasks, such as:
- Ability to map a newly created (or saved search) to one or many paragraph styles with a specific character style.
- Ability to highlight the results of a GREP search in real time.
Marijan Tompa (aka Tomaxxi) has two GREP scripts, but of interest is TomaxxiGREP. This script presents a panel that shows what GREP styles are applied to highlighted text, and gives real-time ability to change the search code and character style of the GREP style without opening the Paragraph Styles panel.
General GREP assistance
Roland Dreger has a script that highlights the results of a GREP search in real-time in a similar fashion to Peter Kahrel’s GREP editor.
Jongware has a dedicated GREP help page and a script titled “whatthegrep” that takes a GREP search and shows in layman’s terms what is being searched for.
InDesignSecrets website has a dedicated page to providing information about GREP.
Virtuosi Media‘s website provided this gem that contains long GREP chains to find specific items such as date formats or, country postcodes.