Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
As I pointed out at the end of the last chapter, we have quite a few spacing problems relating to our text. We're going to fix a lot of them in this next step, which is to us a grip style, which will ensure that there're always at least two words at the end of every paragraph. Let me point now a couple of the problems that we currently have. I spotted one on line 16 of page 81. Right there, a single word to end a paragraph.
Now, because this is a lot of dialogue in this text, that problem might occur quite frequently and sometimes the solution to the problem might be worse than the problem itself. If that last word is a long word, then it's not a problem at all. But if in this case it's a very short word, then it is a problem. Another issue that I spotted is at the top of page 92, where we have a single word isolated from its paragraph, a single orphaned word. So, obviously we want to fix that as well.
Now, this is not the only thing that we're going to be doing to fix these kind of problems, but it is the more macro solution. So, it's the one that we want to apply first. Let me just point out this very useful course on lynda.com. Learning GREP with InDesign by Michael Murphy. Now, Michael Murphy is my go-to guy whenever I need to brush up on my GREP, which I have to admit is not my strongest suit in InDesign. But whenever I forget something or need a refresher, this is the course that I come to, specifically for what we're doing here.
This movie, dynamically fixing orphaned words with GREP, and I'm going to be adapting these techniques that he outlines in that movie. I'm going to come to my Body style and edit that, and then come to GREP styles. Now, what I want to do is apply a GREP style to a specific text string. So firstly, I need to define the character style that is being applied.
And I'm going to call this no break for obvious reasons because, the main attribute that we want to apply to this character style is no break. But in addition to that, I'm also going to give it a highlight. And this highlight is only going to be temporary, just so that we can see the change very visually. And then once we verified it, we will turn this off. But I'm going to come to my Underline Options, turn the Underline on. And then I'm going to make the weight of the underline ten points, and its offset I am going to make minus 10 points.
Now, that may not look very good, but it's just going to be good enough for our purposes to see where this has been applied. And I'm going to change it's color to yellow. Alright, so now I say what is the text that this character style will be applied to. What we're looking for is the last two words of a paragraph. And then we want to apply a no break to them so that there are always at least two words on the last line. So, firstly I'm going to come down to my Wildcards and choose any word character, and I need to extend that to be any word character one or more times and the symbol for that is Plus.
And then this is going to be followed by a space, and the symbol for that is \s. And then, the space will be followed by any word character, which I can just type in again, \w, one or more times. That will only take us so far. We now need to specify that word space word can be followed by any type of punctuation. And the punctuation is in this section, this Posix Flyout menu. I have no idea what Posix means, but this is where it is. And because some of these paragraphs end not just with a single punctuation point, but in some cases with two full stop followed by a closing quote for example, then that also needs to be followed by a plus.
And then, to finish this off, I need to say, where in the paragraph this occurs, and that is going to be Location > End of Paragraph. And now we can see after a pause, where the no-break style is automatically being applied. And that hasn't entirely solved that problem, because we still have the orphan, but at least we do have two words at the end of that paragraph. But now, let's go to page 81, where we saw the other problem.
And that problem is solved. Now whenever you apply a change like this, something has to give. And in the case of this particular instance, that something is that the word spacing on the preceeding line has now been increased. And it's been increased to a somewhat undesirable extent. But the cure is still preferable to what we had before. So everything from now on is going to be a compromise of some sort. I'm now going to go back to my first page and then just take a page through the document to see where this change has been applied. And for example, if I were to come to page eight, I'm going to now undo that change, Cmd+Z and then we'll revisit page eight.
We can see that there is a problem that has been fixed to make one respectable person. And then if I press Cmd+ShiftZ to redo that change. Go back to page eight, we can see problem solved. Now that we've verified the effect of applying that GREP style, I am going to come to my Character Styles panel. I'm going to edit the no break character style and I'm going to turn off that underline
Get unlimited access to all courses for just $25/month.Become a member
117 Video lessons · 43013 Viewers
119 Video lessons · 54336 Viewers
65 Video lessons · 14564 Viewers
113 Video lessons · 82927 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.