You have received a Word doc to place into your InDesign file. The text is messy with more typing mistakes than you have time for. What now?
If you have wished for a quick way to clean up the endless typing errors in a text document without manually reading for them, then you might enjoy the labor- and time-savings of this cross-platform script that runs within InDesign. It is based on the script that comes pre-installed named Mike'sFindChangeByList2021.jsx. It greatly adds on to this excellent idea. It cleans up 30 common typing problems in your placed text, starting with doubled spacebar spaces and multiple hard returns. This is an improvement on the FindChangeByListPLUS posted here for 2019, 2017, and 2014. Download MikesFindChageByList2021.
2. Select both the MikesFindChangeByList2021.jsx script and the MikesFindChangeByList2021 sub-folder and either drag and drop (or copy and paste) into this folder location:
Users/Username/Library/Preferences/Adobe InDesign/Version 1x.0/en_US/Scripts Panel
Users\Username\AppData\Roaming\Adobe\InDesign\Version 1x.0\en_US\Scripts\Scripts Panel
If you are in an earlier version, you would substitute "Version 16.0" with whatever version number you are installing into.
3. Restart (but not always necessary) InDesign 2021 (or your earlier version) and open Window > Utility > Scripts. The resulting opened Scripts panel will have your new script, MikesFindChangeByList2021.jsx, ready to be double-clicked into action for cleaning up the many typing errors in your text. It can run on either a chosen story, the story your type tool is inserted into, or the whole document.
The first nine text cleanups are what this and the original script accomplish on your tagged (paragraph styled) or untagged (unstyled) text:
1. Find all multiple spaces and replace with single spaces.
2. Find all spaces preceded by a return and remove the space. Now improved to protect paragraph styles.
3. Find all spaces followed by a return and remove the space. INow improved to protect paragraph styles.
4. Find all double TAB characters and replace with single TAB character.
5. Find a TAB character preceded by a return character and remove the tab character. Now improved to protect paragraph styles.
6. Find a tab character followed by a hard return character and remove the tab character. Now improved to protect paragraph styles.
7. Find all double returns and replace with single returns.
8. Find all space-hyphen-space and replace with an en dash. Improved to work with or without spaces present.
9. Find all hyphen-hyphen and replace with an em dash without spaces. Improved to work with or without spaces present.
As an improvement on the original script, the above find/changes won't inadvertently change any applied paragraph styles within your text. That means it is safe to run on raw (not yet tagged) text as well as on text that has already been paragraph-styled. Therefore, you could choose to run this script early on or later in your workflow. Also, it does a more thorough job of correcting en and em dashes. Once I got to thinking about correctly typeset en and em dashes, I began to think of other common corrections I would like the script to accomplish. These are the additional features added on in the MikesFindChangeByList2020.jsx version:
10. Force all 10-digit phone numbers to conform to 3-dot-3-dot-4 pattern.
11. Find all single hyphens (with or without spaces) between two numbers and replace with an EN dash.
12. Find all soft return line breaks and strip them out.
13. Find all single ditto marks (aka dumb quotes) within contraction words and replace with apostrophes.
14. Find all single ditto marks and replace with single opening quotes.
15. Find all single ditto marks and replace with single closing quotes.
16. Find all double ditto marks and replace with double quote marks.
17. Find all single left quote marks to the left of double digits and replace with apostrophes.
18. Find all discretionary hyphens and strip them out.
19. Find three period stops and replace with a single ellipsis character.
20. Find all doubled period stops and replace with a single period stop.
21. Find all manually made bullets and remove them (in favor of using a bulleted style).
22. Removes the last hard return at the end of a story.
Anyone can open the MikesFindChangeList.txt in any simple text editor and edit or "comment out" any find/change sequences you don't want to use. Commenting out means typing two forward slashes at the beginning of the line. This causes the script to ignore the command on that line of the script. You can also easily add in additional grep and text searches that you would like to include, just as I have done in this edited script. If you know a common typesetting cleanup that you would like to have added in; or if you spot a code error, just drop me an email.
I hope you enjoy this time-saving script!
Call us about your training needs today! Click for our Onsite Custom Training Request form.
Take a look at our classroom training materials and handouts! Click for our InDesign 2022 useful resources.