October 9 2006 • 1:39 PM

Episode 30: Find…Change…Format!

Most of you are probably familiar with the concept of Find/Change (or Search and Replace, or whatever your word processing, spreadsheet or text editing program calls it). InDesign boasts a robust and powerful Find/Change feature that incorporates its even more powerful Paragraph and Character Style features, allowing you to search for and replace text, limit searches to specifically-formatted text, apply styles as text is replaced, and much more.

In this extended episode, I take an in-depth look at the power of Find/Change…starting with the basics, revealing the hidden extras, and building up to completely formating a three-page layout using only Find/Change operations.

I think you’ll find that what you learn here will change how you work. (Sorry…I just can’t resist a cheap joke.)

Download it now or watch it in your browser:
The InDesigner - Episode 30 (49.9 MB, 18:04 minutes)

25 Responses discussing this post. Add yours below.

  1. Anonymous
    October 9th, 2006 • 3:22 pm • Link

    so, which is it, upgrade to 7.1.3 or don’t upgrade?

  2. October 9th, 2006 • 3:39 pm • Link

    As with all software upgrades, your mileage may vary. Sandee’s post seems to have isolated the 7.1.3 issue to a handful of specific circumstances.

    I’m on a PowerMac G5, running OS X 10.4.8 and I have no problem whatsoever using QuickTime and InDesign CS2 v4.0.4. My “testing” of this is limited to the following method: I tried it, and it worked.

    As I said, your results may be different…but to take advantage of the large-format sync to a video iPod, I believe that QuickTime 7.1.3 is required.

  3. October 9th, 2006 • 11:32 pm • Link

    Great podcast, as usual! Some great tips. I’m wondering though if anyone knows how to do a find for a ‘paragraph rule’. I can’t seem to find it as an option… but maybe I’m missing something…

  4. October 9th, 2006 • 11:40 pm • Link

    Michel,

    Paragraph Rule isn’t one of the options iin that long pull-down menu in the Find/Change dialog box, and it’s puzzling that it’s not in the searchable attributes in the Find Format Settings. Even attributes as obscure as “Keep Options” are searchable.

    However, if you set up your paragraph rules as an attribute of a Paragraph Style, you can search on the style. It’s not exactly what you’re looking for, but that would be the way to do it.

  5. October 10th, 2006 • 11:32 am • Link

    Hi Michael,

    Thanks for the tip, but the problem was that the paragraph rule came in from a Word import, so I was looking for a quick way to search and replace that. Luckily, it’s such a big visual cue that it’s easy to do manually… Maybe CS3 will add that to the searchable attributes.

  6. October 10th, 2006 • 2:33 pm • Link

    I’m no fan of Word, so I’m not sure if this is possible, but can you search for a paragraph rule in Word? If so, you could apply a style to each instance in Word (any style will do), then map it to a style in your InDesign file that has its own paragraph rule settings usiing the Microsoft Word Import Options when you place the text. Just a thought.

  7. October 10th, 2006 • 3:55 pm • Link

    Another Great Great Podcast,
    One small question, How did the styles know when to stop, I understood the change of the “Whats New” but how did the text after that get changed leaving that one paragraph open for the 9pt times new roman replacement?

  8. October 10th, 2006 • 4:12 pm • Link

    Daniel –

    It’s important to realize that when I did my Find/Change for those examples, I used Paragraph Styles for the Change Format Settings, not Character Styles.

    When I did all of the “Web Tools”, “What’s New” and other replacements, they all had nested character style instructions in them. The style was set up as follows:

    A nested character style is used through two En Spaces (the first En Space creates the space to the left of the text, the second creates the spae after the colon). Then, it defaults back to the standard formatting of the style.

    So I’m actually applying two styles at once in the Find/Change operation…the paragraph style, and the character style nested within it.

    Each time I did my Find/Change operations, I was eliminating another instance of the Times Roman formatting until I was left with just those two instances per company listing. That’s why I did the 9 point Times search last.

    Is that clear? If not, I’ll try to elaborate more.

  9. patrice
    October 10th, 2006 • 4:20 pm • Link

    please an ipod version

  10. October 11th, 2006 • 5:35 am • Link

    Hey Michael, very cool. I never realized that Anchored Object Marker was one of the options in the metacharacter dropdown menu. (Side note: I liked how you made that wave effect with the anchored graphic on top of a the backround rule! You should do one on clever uses for anchored objects. Apologies if you’ve done one already …)

    That bit about not being to do a find for the 9 pt Times text because there wasn’t a consistent pattern in its text … when I’ve been in the same situation, I’ve often done just what you did in the video (search for that local formatting); but that doesn’t work when there’s *other* 9 pt Times in the flow that I don’t want to change.

    So what I do then … and what I probably would’ve done in your example too (just because I use this method so often) … is to look for a *larger* pattern. If there is one, I leverage it to use Find/Change to put a marker in the “no pattern” text, then find/change based on that marker, then remove the marker (if necessary).

    So in your example, the text preceding the no-pattern Times text (I’ll call it the “Description” paragraph) is sometimes the Parent Company paragraph but sometimes it’s not, so there’s no pattern there. But it looks like in every instance, the “Web Tools” paragraph immediately follows the Description. So that’s a pattern.

    So you could do something like:
    Find: ^pWeb Tools
    Change: ^h^pWeb Tools
    [no formatting changes]

    This inserts an End Nested Style character as the last character of the Description. (I use the ENS character for a marker in Find/Change a lot since it adds no white space …have to be careful it doesn’t mess up Nested Styles of course.)

    If inserting an ENS would mess it up, or you’re already using it somewhere, you could use any unique character string, then use Find/Change at the end to delete it.

    After you’ve “marked” your paragraphs, then just do a Find for the marker (only the marker) and Change its format to the one you want for Description. Since it’s a paragraph style, the whole paragraph changes, of course.

    Then like I said, delete the marker (via Find/Change) when you’re done, if necessary.

  11. October 11th, 2006 • 1:58 pm • Link

    Brilliant, Anne-Marie! Is it an indication of how much of a geek I am that I get all excited figuring out ways to do these kind of power searches? :)

    Outside of the context of a videocast that was already running long, I probably would have worked something like that out. Especially if I didn’t have the Anchored Object to bail me out.

    As for clever uses for Anchored Objects…it’s on the list to be a two-part videocast in the coming months!

  12. October 11th, 2006 • 6:46 pm • Link

    Thanks for the great info! You have saved me tons of money on getting counceling for my fear of Find/Change and Anchored Objects! Kudos

  13. October 12th, 2006 • 3:59 pm • Link

    Patrice: In reference to your comment above, there are some “technical difficulties” in producing an iPod version for this episode related to the changes in iTunes and QuickTime since Apple began its new movie download service. The new spec for iPod-compatible video allows for the large-format (640×480) video to be transferred to an iPod, but does not allow any customization of the options.

    As a result, everything is in stereo (which is unnecessary) and uses quality settings that are inappropriately high for the podcast.

    What happens then is that the iPod version becomes twice the size of the normal version when exported as a “.m4v” file. In the case of this episode, which is 50MB (give or take), the iPod version becomes 100MB.

    I’m reluctant to post this version for two reasons: (1) the end-user would be saddled with an unnecessarily large file, which is unfair to them, and (2) a file this size will end up exceeding bandwith limitations on my server, costing me money to distribute a free videocast, which is unfair to me.

    Until the issue is resolved, here’s a workaround for you:

    1. Download the normal version.

    2. In iTunes 7 (you must be using that version for this to work, select the episode in your list of podcasts and, from the Advanced menu, select Convert Selection for iPod.

    This will take some time to convert, depending on the length of the video, and you’ll see that this 50MB episode will balloon up to about 79MB when the conversion is completed. But at least you’ll be able to transfer it to your iPod.

  14. patrice
    October 13th, 2006 • 6:55 am • Link

    thanks for your comment
    i appreciate very well all your secrets and make me better…

  15. Rahim
    October 16th, 2006 • 9:06 pm • Link

    This was my first video cast & it ROCKED!! AWESOME!!

    Now I have something to watch while I’m waiting at school!!

    Thank you, because now I have 29 earlier videocasts to catch up on.

    EXCELLENT!

  16. Stuart
    October 19th, 2006 • 6:41 pm • Link

    Hi Michael! I just came across your podcasts and they’re great. Thanks for doing them! There are lots of great tips, and they’re not all for the beginner. Keep up the great work and I’ll be tuning in!!

  17. October 20th, 2006 • 11:52 am • Link

    Hi… Great video!
    But is it possible to search for Column Break and Frame Break?
    Apparently it figures as a ^p which is also the tag for Line Break

  18. October 29th, 2006 • 3:34 pm • Link

    You are correct, Mikkel. As far as Find/Change is concerned, all of those break characters are represented as ^p.

    The only workaround I can think of is to somehow “force” your special break characters to be unique. For example, when you insert a column break, select it and apply a Character Style called “Column Break” so that you can take advantage of Find/Change’s ability to use formatting as a criteria.

    You can then use the “Column Break” style in addition to the ^p metacharacter to help Find/Change distinguish between a regular break and your special break characters.

  19. lowJackson
    October 31st, 2006 • 8:28 pm • Link

    Hi, since viewing this great technique I have loved applying it to my own work, it comes in so handy when ‘next style’ & ‘nested style’ don’t cut it. However, can anyone recommend a way to do this (more of a find/change than formatting issue)… I have a long list of times 2.30, 5.45 7.10 etc I know all of them are pm, but I need to add the pm to my text, I tried a Find/Change from ^9.^9^9 to pm but when it find my digits, it also replaces them with just the pm, Indesign won’t let me keep the digit its finding?

  20. October 31st, 2006 • 8:49 pm • Link

    That is a function that, to my knowledge, is still sorely lacking from InDesign. What you’re looking for is a search for “any digit, a period, and any two digits” and you want to replace it with “the original digit, the period, the original two digits, a space, and the letters ‘p.m.’”

    This is a level of variable searching that is not possible from within InDesign itself. But it is possible elsewhere…for instance, in a great text editor for the Mac called BBEdit. You can peform this kind of pattern searching, also know as Grep, to do some really amazing things.

    I wrote a post about that some time back, which you can find here:

    http://indesignsecrets.com/grep-pattern-searching.php

    You may want to try getting your text out of InDesign by selecting it and exporting the text as InDesign Tagged Text (File –> Export, then choose InDesign Tagged Text as the export format).

    Bring that tagged text into a a Grep-capable text editor, run the pattern search, and then import the text back into InDesign, where all of your formatting will be automatically restored (or rather, applied) by the instructions present in the InDesign tags.

  21. lowJackson
    October 31st, 2006 • 10:23 pm • Link

    Thanks for the response Michael, I will look into that as its something I have no knowledge of. Meanwhile keep up the podcasts, they are a great source of inspiration.

  22. Aaron
    November 1st, 2006 • 7:24 pm • Link

    Excellent videocast as usual, Michael.

    What I’d love to see is a way to populate the Find field with the actual formatting attributes of the text selected. Like, use cmd-shift-F1 and it will put in not just the selected text, but its font, etc. This would save time in going through the font menu to specify the proper font.

  23. January 20th, 2007 • 12:31 am • Link

    Michael,

    I am planning on using FileMaker data to automate calendar production and your comment about using a Style to Insert Frame Breaks is perfect. That will allow holidays and moon phases to be multi-line and fit right into the workflow. Just wanted to say Thanks!!

  24. thatcher
    January 29th, 2008 • 5:45 pm • Link

    I am posting this on two pages because of the related content, I hope this doesn’t offend anyone’s sensibilities :)

    Here goes:
    Is is possible to apply a nested paragraph style to selected text only?
    OR
    To create nested character styles?

    Here’s the situation:
    I have a 120+ page document with hundreds of instances of various brands, and a list of those brands. The brands need be changed to italics, and next to each brand we need to add a superscripted number.

    There must be a way to use find/replace + apply a nested style that would turn everything up to the last character (the number) to italics, and then superscript the last character!

    But how?

  25. January 29th, 2008 • 6:03 pm • Link

    Thatcher — Here’s the thing with nesting: it follows a specific structure (use this style through or up to this, then switch to the next style through or up to this, and so on), so for nesting to handle this for you, you’d need some consistent “trigger” in your text already (i.e. an En space or a tab or a dash) that follows each brand name.

    GREP in CS3 can probably do what you’re looking for, but the specifics of how to do it are dependent on the specifics of your content. The patterns and conditions used to perform such an operation will have to be tailored to the structure of the text that’s being searched.

    The answer is, theoretically, yes…but the specifics are far more complicated than that.

    Feel free to e-mail me a PDF with a representative sampling of your content if you’re at liberty to do that.

Subscribe to the Discussion

Get the ongoing discussion surrounding "Episode 30: Find…Change…Format!" delivered to you. Click here to subscribe via RSS.

Leave a Reply

You can use limited HTML tags, such as <em></em> for emphasis/italics and <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

InDesignSecrets reserves the right to edit and/or remove posts and comments.