Documentation

InDesign GREP Searches

In addition to the Scribe Tools, a set of GREP searches is included in the scr-ScribeTools.zip file.

Instructions for downloading and installing Scribe Tools for InDesign are here.

Installing the GREP Searches

  • In InDesign, navigate to your Scripts folder.
  • Select the User folder.
  • In the context menu, select Reveal in Explorer/Finder.
  • Navigate back one level to the en_US folder. Within that folder, there will be a folder called Find-Change Queries.
  • If it contains a GREP folder, open it and add the searches from Scribe’s GREP folder. If it does not, copy Scribe’s GREP folder to this location in its entirety.
  • In InDesign, the GREP searches are accessible through the Query drop-down menu within the program’s Find/Change window.

GREP Searches

GREP searches are intended to help typesetters apply features or find potential errors. It is inadvisable to “replace all” with any GREP search without first confirming that the change is being applied as intended.

Add 000 Placeholders to TOC

This search will had 000 as placeholders for page numbers in a Table of Contents. Select the TOC text and run on the selection. Do not run on the entire book.

Adjacent Quotation Marks

This search will add hair spaces between combinations of single and double quotation marks.

Any Letter after Closing Parenthesis

This will search for any letter that immediately follows a closing parenthesis, as they may need a word space placed between them.

Any Letter after Punctuation

This will search for any letter that immediately follows a punctuation character (not including quotation marks), as they may need a space between them.

Any Letter after Quotation Closing

This will search for letters that immediately follow a closing double quotation mark as they may need a word space placed between the two.

Any Letter before Opening Parenthesis

This will search for any letter that immediately precedes an opening parenthesis, as they may need a word space placed between them.

Any Letter before Quotation Opening

This will search for letters immediately before an opening double quotation mark as they may need a word space placed between the two.

Any Space after Any Quotation Opening

This will search for any type of white space immediately after an opening single or double quotation mark.

Any Space before Any Quotation Closing

This will search for any type of white space immediately before a closing single or double quotation mark.

Apply tocnum

This will apply the tocnum character style to the page numbers in a Table of Contents. Select the TOC text and run on the selection. Do not run on the entire book.

Combining Diacritical Marks

This will search for any accent characters that have been autocombined with a letter. Replace with the proper single Unicode character as needed.

Constructed and Orphaned Accents

This search will locate any accents that are not properly combined with the character to which they belong. Replace as needed on a case-by-case basis with the correct single Unicode character.

Contraction No Break

This search forces InDesign to prevent the hyphenation of the following contractions:

  • aren’t
  • haven’t

Duplicate Punctuation

This will search for a variety of punctuation combinations that are placed side-by-side with no space between them, as one of the punctuation symbols may need to be removed or a space may need to be added between them.

Hebrew Adjacent to English

This search will find if there are any Hebrew characters directly adjacent to English letters. It is likely that the missing space is unintentional and incorrect.

Missing Closing Bracket

This will search for any opening square bracket that is not followed by a closing square bracket.

Missing Closing Parenthesis

This will search for any opening parenthesis that is not followed by a closing parenthesis.

Missing Opening Bracket

This will search for any closing square bracket that is not preceded by a closing square bracket.

Missing Opening Parenthesis

This will search for any closing parenthesis that is not preceded by an opening parenthesis.

Missing Quotation Closing

This will search for any opening double quotation mark that is not followed by a closing quotation mark.

Missing Quotation Opening

This will search for any closing double quotation mark that is not preceded by an opening quotation mark.

No Break around Brackets

This search will prevent square brackets from being placed on a separate text line from the first or last word within the brackets.

No Break Between 2-Initial Names

This search will prevent the initials in names from getting separated.

No Break Between 3-Initial Names

This search will prevent the initials in names from getting separated.

No Space before Soft Return

This will search for any soft return that is missing the word space needed before the soft return. As a rule, this space should be retained in all instances other than URLs.

Possible Bad Paragraph Breaks

This will search for any paragraph that begins with a lowercase letter. Recombine with previous paragraph as needed.

Possible Missing Space before Soft Return

This search will find soft returns that do not have a space in front of them. Soft returns are excluded from XML exports, so this would result in words getting run together unintentionally. With the exception of URLs, there should typically be a space before soft returns.

Problematic Characters

This searches for a variety of punctuation and other special characters that may need adjustment or special handling.

Quotation before Date

This will search for abbreviated dates (e.g., ’75). Use this search to verify that the apostrophe is facing the correct direction.

Quotation before Letter

This will search for abbreviated or slang words (e.g., go get ’em). Use this search to verify that the apostrophe is facing the correct direction.

Quotation inside Word

This will search for single quotation marks that may be facing the incorrect direction.

Regular Space before Punctuation

This will search for any punctuation symbol that has a word space preceding it. Use this search to determine if the space should remain as it is, be changed to a nonbreaking space, or be removed entirely.