Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Preserving formatting in an index

From: Creating Long Documents with InDesign

Video: Preserving formatting in an index

Here's a common problem when it comes to indexing. You have certain entries that need character-level formatting like italics. Things like book titles, newspapers, magazines, animal and plant species, and so on are all typically italicized. They are in my body text, and I'd like them italicized also in my index entries. For example, I have the title Alice in Wonderland here, and that should be italicized. The problem is, when I include these terms in an InDesign index, the italics gets lost. I can apply paragraph styles to each level of index, but no character-level formatting is retained from the original text.

Preserving formatting in an index

Here's a common problem when it comes to indexing. You have certain entries that need character-level formatting like italics. Things like book titles, newspapers, magazines, animal and plant species, and so on are all typically italicized. They are in my body text, and I'd like them italicized also in my index entries. For example, I have the title Alice in Wonderland here, and that should be italicized. The problem is, when I include these terms in an InDesign index, the italics gets lost. I can apply paragraph styles to each level of index, but no character-level formatting is retained from the original text.

So do you just have to accept that or manually fix it? Well, sure, you could do either of those things, but there is another option that combines a little bit of old-fashioned text tagging with a little bit of GREP Find/Change to get that character formatting into your index. What I need to do is to go to my Index panel and look at the Alice in Wonderland reference and double-click on the page number. I am going to apply some tags to the topic level. I'll click before it. And you can create any tags that you want.

I am going to use some square braces and just type the letter I inside of them, just to indicate italics. So open and close brace, and inside those I'll type a lowercase i and after the title, I'll type open and close brace and inside those, I'll type a forward slash and an I, just to indicate that it's a closing tag. Now I don't want to sort this reference by these things because right now it will sort by that first brace, and then we'll go into the Symbols section instead of sorting by the A. So I am going to click and drag and select Alice in Wonderland, copy it, and paste it into the Sort By field.

Now I'll click OK and regenerate my index. And here I can see now I have the tagging appearing in my index. Now, of course I don't want this tagging to come out in the final product, but this is going to allow me to do a Find/Change where I find and change anything between these two markers and replace it with italics formatting. So let's do that now. I'll press Command+F or Ctrl+F on the PC to bring up the Find/Change dialog box, and here I have an interesting GREP query.

That's what I am going to use to replace those braces with italics formatting. It looks a little intimidating and obscure at the start, but we'll take it one piece at a time, and you can figure it out. It's made up of three parts that are separated from each other in parentheses. There's one part here, a second part in the middle, and a third part here. So let's take the first part. The first part is just going to find this opening tag. So inside the parentheses I have the special character for the open brace, which is the slash and the brace.

Then I have the I, and then I have another GREP special character for the closing brace, which is the slash and the brace. And all that together is going to find this right here. Now in the middle I have another grouping, and these are the special characters for any character which is the period one or more times. So now I'll find any characters, and that's going to find anything in between my opening and closing tags--in this case, Alice in Wonderland.

The third part of the GREP expression is going to find this closing tag. So the first thing I have here is the special character for the closing brace, so the slash and the brace, and now I have to find this forward slash. This looks really weird, but it's these two slashes together. Then I have the I, which is this, and finally the closing brace. Taken all together, this will find anything inside these tags.

In the Change to field, I just want to find what's in the middle, the second expression. So that's what this $2 is. And I got that from picking in the special characters, Found > Found 2. So find the second thing that you found in this expression, right here in the middle. Then I am going to apply some formatting. I'll click down here to open the Format Settings, and I am applying a character style that I created, IndexItal. That just italicizes the words. So let's run this query and see what we get.

We'll click Change All, OK, and Done. So it found and removed those braces and applied italics to what it found in the middle. Now there's one thing to be aware of: If you generate the Index again, it'll overwrite this text that you performed the Find/Change on. It will find what was in the index markers, including those tags again. But if you save that query, you can run it again very quickly, and that's certainly a small price to pay for a fully formatted index.

It's just something to be aware of. Now that we've seen the ins and outs of native InDesign indexing, we'll take a look next at some third- party indexing alternatives.

Show transcript

This video is part of

Image for Creating Long Documents with InDesign
Creating Long Documents with InDesign

59 video lessons · 15746 viewers

Mike Rankin
Author

 
Expand all | Collapse all
  1. 10m 48s
    1. Welcome
      54s
    2. Using the exercise files and scripts
      1m 51s
    3. Long-document workflow overview
      4m 20s
    4. Analyzing the planned output
      3m 43s
  2. 34m 7s
    1. Using master pages
      9m 34s
    2. Using layers
      7m 23s
    3. Using text variables
      6m 42s
    4. Using section markers
      5m 44s
    5. Synchronizing text
      4m 44s
  3. 26m 16s
    1. Using InDesign templates
      7m 10s
    2. Setting up preferences
      3m 27s
    3. Using Word templates
      5m 50s
    4. InCopy workflows
      5m 17s
    5. Creating a production manual
      4m 32s
  4. 40m 2s
    1. Using Based On styles
      6m 14s
    2. Using nested styles
      5m 56s
    3. Using Next Style
      3m 39s
    4. Using GREP styles
      6m 17s
    5. Using object styles
      2m 48s
    6. Using table and cell styles
      5m 8s
    7. Using swatches
      5m 33s
    8. Using Quick Apply
      4m 27s
  5. 37m 57s
    1. Placing text
      4m 57s
    2. Placing images
      3m 41s
    3. Creating metadata captions
      4m 3s
    4. Using Mini Bridge
      4m 38s
    5. Using libraries and snippets
      6m 4s
    6. Using GREP Find/Change
      5m 5s
    7. Find/Change tips
      5m 21s
    8. Using Layout Adjustment
      4m 8s
  6. 15m 53s
    1. Using Notes
      4m 7s
    2. Tracking changes
      4m 36s
    3. Using CS Review
      7m 10s
  7. 34m 43s
    1. Creating tables of contents
      7m 9s
    2. Alternative uses for the TOC feature
      4m 9s
    3. Creating cross-references
      6m 8s
    4. Creating footnotes
      6m 31s
    5. Importing footnotes
      6m 47s
    6. Creating endnotes
      3m 59s
  8. 33m 50s
    1. Scoping out the index
      2m 19s
    2. Creating index topics and references
      9m 29s
    3. Creating index cross-references
      3m 1s
    4. Creating index references with Find/Change
      3m 31s
    5. Generating an index
      3m 35s
    6. Preserving formatting in an index
      5m 13s
    7. Using third-party indexing tools
      6m 42s
  9. 26m 44s
    1. Using InDesign book files
      4m 37s
    2. Numbering book documents
      5m 46s
    3. Synchronizing book documents
      7m 5s
    4. Preflighting book documents
      3m 49s
    5. Outputting book documents
      5m 27s
  10. 12m 54s
    1. Using conditional text
      5m 1s
    2. Using Smart Text Reflow
      4m 3s
    3. Using object styles for customization
      3m 50s
  11. 25m 17s
    1. Preflighting documents
      6m 56s
    2. Exporting to print PDF
      5m 26s
    3. Exporting to interactive PDF
      5m 36s
    4. Archiving a project
      7m 19s
  12. 48s
    1. Goodbye
      48s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating Long Documents with InDesign.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.