From the course: InDesign Secrets

234 Free script identifies word stacks - InDesign Tutorial

From the course: InDesign Secrets

234 Free script identifies word stacks

- [Voiceover] It's essential that you are human. Proofread your documents. Look them over. See if anything looks wrong. Now, I'm not talking about just spelling and grammar, but anything that might jump out and attract your reader, or your audience, in a bad way. For example, here's something that's tricky to catch. See how these two words, to and to, are lined up along the left margin? That's called a word stack, and they're notoriously time-consuming to find. Plus, after all, it takes a human eye to see them. Or does it? Because at the 2015 PePcon conference in Philadelphia, InDesign automation expert Chris Copeters considered this thorny problem of word stacks, and he came up with a script. And not only did he write this script, but he released it to the community for free. Here's how it works. First, you have to install it. And you can do that by going to the scripts panel, which you'll find if you go to the window menu, come down to the utilities sub menu, and then choose scripts. Inside the scripts panel, you'll see a couple folders. Application and user. Now, inside my user folder, I have another folder called David's Scripts that you won't see, but that's okay. I'm going to right click on the user folder, and then I'll choose reveal in finder. That switches to my finder. Now, if you're on windows, it'll say reveal in explorer, and it'll switch to Windows explorer. And then it automatically opens the scripts folder. And inside that folder, there's another folder called scripts panel. I'll double click on that to open it, and you can see there's my David's Scripts folder. Now I've already downloaded the script here. It's called SmokeWordStacks, because Chris always loves using puns in his product names. Anyway, I'm gonna tell you where you can find and download it yourself in a minute, but I've downloaded it, and I've unzipped it, and I'm going to install this script. So to do that, all I need to do is drag this whole folder into the scripts panel folder. There it is. Now I'm going to switch back to InDesign, and you'll see the SmokeWordStacks folder inside the scripts panel. Let's open that by clicking this little triangle. And we want to run this script by double clicking on the SmokeWordStacks.jsxbin file. That's the script inside the folder. I'll double click on it to run it, and I'm just going to use the default settings here, and click okay. Now, I should say here that the longer your document, the longer this is going to take. I would not run this on a document if it were 50 or 100 pages, it would just take forever. But for shorter documents it works great. Now, when it's done, you can see that it identified a bunch of stacks way faster than it would've taken me to find them with my own eye. And the stacks are highlighted with a thick underline style. For example, up here, the word are is highlighted with that red line, because it's the second one, the last one, in the stack. Here's another one, in the middle of a paragraph, the word pictures is duplicated. It's a stack of the same word. Let's move this scripts panel out of the way here, and you can see that there's a blue highlight here. That blue underline means it's a hyphenation stack. There are two or more hyphens in a row. Now, these red and blue lines are actually character styles that the script created and applied to the text. Now, if I wanted to, I could undo this whole thing with one click, just by pressing the old command, z or control, z on Windows. But in this case, let's say I've been working on my document, and I can't undo that step anymore. So if I wanna get rid of those highlights, all I need to do is go to my character styles panel over here, I'll open that, and I'm gonna scroll down, and I can see that the script added two character styles, text stack and hyphenation stack. I can simply drag those on top of the trash can icon, and now, I can say replace it with none. But when you do this, make sure you turn off preserve formatting. You wanna make sure that check box is off. Then I'll click okay, and you can see that that highlight goes away. Let's go ahead and get rid of the text stack, too. Set that to none, turn off preserve formatting, and click okay. Now, this is already incredible, right? But Chris went even farther, and he lets you tweak a bunch of settings inside this script. You can change that inside this .ini file, the SmokeWordStacks.ini file. Now, I wanna say you do not have to edit this file if you don't want to, but if you don't mind getting your hands a little dirty, you can do incredible things in here. Let me show you how. First, I'll switch back to the finder, or explorer, and I'm going to edit that ini file. I can do that simply by double clicking on it, and it should open up inside your default text editor. Here on the Mac, I'm using text wrangler. Now, this looks kind of scary, but it's really well commented, so you can just read through this and learn how it works pretty quickly. Now in this case, I'm just gonna scroll down here a little bit, and I'm looking for numLettersToOver/Lap. Now right now, it's set to blank, but I'm gonna set it to one. And I'll show you what that does. So I'm going to save this by pressing command s or control s on Windows, and now I'm gonna go back to InDesign, and I'm gonna run the script one more time. Once again, I'll leave it set to the defaults, and click okay. Now this takes a little bit longer, because it's looking for even one letter stacks, for example, here I have an M below another M. So it says that must be a stack. Now, that might be a little overkill, but I just wanted to show you that Chris has really given you a huge amount of power within this script, if you're willing to tweak that ini file a little bit. I should point out that Chris is the owner of rorohiko.com, and they have a lot of amazing scripts and plugins. But even better, they specialize in custom publishing automation for large companies. So if you work for a company that needs to automate some kind of publishing task, you should definitely contact them. Anyway, this script is pretty cool, huh? And, as I said, it's free. If you wanna get it, you can find it at InDesign secrets by going to this url. Cpn.co, that's .co, not com, slash g, slash stacks.

Contents