From the course: Designing a Book

Cleaning up text - InDesign Tutorial

From the course: Designing a Book

Start my 1-month free trial

Cleaning up text

- [Instructor] So, we have placed our text but our text is currently a mess and we need to clean it up. Before we start applying formats to it we just need to get rid of all the extra paragraph marks and all the extra spaces, and we need to automate this as much as possible. A major problem that we have is that the text has a carriage return at the end of every line. We need to remove those. But of course, we can't just remove all the carriage returns because the text needs to be broken into paragraphs. Thankfully, there is a discernible pattern. Wherever there are two consecutive paragraph marks those need to be retained. That indicates the end of the paragraph. It's just these ones at the end of every line that need to be replaced with a space. So, to do that, I'm going to come to the Edit menu, and choose Find/Change. What I'm finding is End of Paragraph, twice. And, I can just type that in if I want, carat P. And, what I'm changing it to is a unique sequence of characters. In this case, I'm going to use three bullets because I know I'm familiar with the text. I know that that sequence of characters is not used anywhere else. I'll go ahead and click Change All. Now, what I need to do is remove the paragraphs marks at the end of the line. The single paragraph marks that are left and I will replace those with a space. I've just typed in a space in the Change to field. Change All. So, that means that we now have this sequence of three bullets indicating where the paragraphs need to be broken. So, I'll come to Find what, type in the three bullets, and replace them with End of Paragraph. Change All. I'm going to come to the beginning of the book. We have a table of contents. It's a static table of contents. We do want a table of contents but we want it to be dynamic. We will generate it from the text. But we can't do that yet, that's for much later on. But, for now, I want to delete the static table of contents. And, then we have various places where there is a sequence of spaces. I want to replace these spaces with paragraph marks. This is going to look worse before it gets better. Now, if you're working on your own document don't make too many assumptions. Look at the text carefully, figure out where the patterns are. The Find/Change is very powerful, but also, potentially, very destructive. So, play it safe. But I'm familiar with this text enough to know that if I have a sequence of say four spaces, I'm just going to select that and copy it, come to Find/Change. Paste it in there that I want those replaced with a paragraph mark. Change All. So, that's going to give me now way more paragraph marks than I need, but I'll address the removal of those in the next step, which is to run a script. I'm going to come to the Scripts panel. If this is the first time you're using the Scripts panel, you'll need to expand the Application folder, then the Samples folder, then JavaScript. Scroll down to FindChangeByList. Now this extremely useful script is a sequence of Find/Change routines that happen in the blink of an eye and they will remove common spacing problems, such as a space before a comma, multiple spaces, multiple carriage returns. If you want, you can open up the text file that contains this list of Find/Change routines and you can customize it to your own needs. But I'm just going to use it off the shelf and I'll double-click on the script. Make the Search Range the Document and we now see that all those extra paragraph marks, most, if not all, of that extra spacing is removed. As we continue through the document we're still going to find problems and we'll address them as and when we see them. But with those few Find/Change routines that we've run, our document now has a structure.

Contents