is now part of CreativePro.com!

Creating Live Captions With Auto-Fit Transparency Effects

4

Recently I got a question from someone who was having trouble combining two InDesign features: live captions and auto-fit for text frames. The person was trying to create nice-looking photo credits by grabbing the Author metadata from photos and putting it in a partially transparent text frame, that automatically fit the length of the author’s name, like so:

20150226-cpation1

But this cool idea doesn’t work because InDesign’s live captions are a form of text variable, and text variables are treated as a single character, and thus confuse the heck out the auto-fit feature. Specifically, in this case the text frame always remained too wide. It never shrunk in width to match the author’s name—until the live caption was converted to a static caption (and real text). But this was a pain because it adds an extra step in the workflow for every image, and an extra thing that can go wrong if you forget to fix it.

At first I thought, oh well, that’s a limitation of text variables, and you just have to deal with it. But an unsolved InDesign problem is like an itch I can’t scratch and it will drive me nuts until it’s fixed. And there’s almost always another way of making something work. So I took another sip of coffee (OK, several sips of coffee), and sure enough, a possible fix presented itself.

Instead of using auto-fit, I thought about using a paragraph rule to create the transparent fill behind the author’s name. The advantage here is that you can make a paragraph rule fit the width of text, not the frame (technically the column), so we can avoid the auto-fit problem. And it doesn’t matter if that text is only one character wide, like a text variable.

But then I ran into another problem. There’s no way to reduce the opacity of the paragraph rule independent from the text. In the Effects panel, you can apply different opacities to a group, an object, a graphic, stroke, fill, or text—and the rule is considered part of the text.

So, another sip of coffee. And then it became clear that what cannot be done with one frame, can be done with two frames. So here’s the recipe for dynamic live captions with partially transparent backgrounds that fit the text:

Create a paragraph style that applies the formatting you want for the photo credit text, call it something like No Rule. Duplicate it and in the new style, apply a paragraph rule with weight and offset values that make it cover the text, and be sure to fit it to the text, not the column. Call the second paragraph style With Rule or the like.

20150226-caption2

Create a No Rule object style that applies the No Rule paragraph style.

20150226-caption3

Duplicate the object style and edit it so it applies the With Rule paragraph style.

20150226-caption4

And then have the With Rule object style reduce the opacity of the object or the text as desired.

20150226-caption5

Choose Object > Captions > Caption Setup and choose Author from the metadata menu. Don’t worry about the paragraph style here since it will be overridden by the object styles.

20150226-caption6

Create a Live Caption by selecting a placed image and choosing Object > Captions > Generate Live Caption. Apply the With Rule object style to the text frame.

20150226-caption8

Copy the text frame and paste it in place.

Apply the No Rule object style to the top frame.

20150226-caption9

Group the frames so they don’t go out of alignment.

Now you have a lovely object that you can add to a library and re-use to generate as many live captions as you wish. As soon as you drag the group over an image with an Author metadata credit, it will appear with transparent background effect.

20150226-caption7

Isn’t coffee a wonderful thing?

Editor in Chief of CreativePro. Instructor at LinkedIn Learning with courses on InDesign, Illustrator, Photoshop, GIMP, Inkscape, and Affinity Publisher.
  • Guy van der Kolk says:

    You are an InDesign God, Mr. Rankin! Nice solution, had to read it twice. ;)

  • …and add data merge to the mix… whoa! Incredible, Mike. Great tip.

    (I like the excellent reference to Ray K., too.)

  • >