I am taking a bunch of text snippets and creating boxes that are 0.2 inches wider than the text snippet to use as a background for it. I have hundreds of these to make. I can't think of a way to automate this, as each text snippet has a different width. Any ideas? Currently I do this:

1. Click on text snippet
2. Copy width
3. Click on background box
4. Paste snippet's width into this width
5. Do a quick +0.2 calculation in the width box

I'd like a way to either automate this or make it quicker. Help is appreciated.

  • Can the background effect be made part of the text snippet's own box? I can suggest how to get the text box to automate to the right width if that's the case. – Lauren-Clear-Monica-Ipsum Apr 4 '11 at 17:38
  • That's a good idea! It's just a background color, which I can get using an object style; but I can't figure out how to size it based on the space the text takes up. Help would be appreciated. – bccarlso Apr 4 '11 at 18:29

Make sure all your text is in a particular paragraph style.

In this paragraph style, make the alignment left, and add a left indent of 0.2 inches (or whatever you need).

Select multiple text boxes.

Select Object → Fitting → Fit Frame to Content. On the Mac it's Option + Apple + C.

Your text box will instantly zip down to the size of the text.

When you have resized ALL your text boxes, go back into the style and remove the left indent. You can change the alignment to centered if you need to.

(BONUS: If you need the box to be a certain height, you can select Object → Text Frame Options and set it manually there.)

  • 1
    Perfect, just what I was looking for, thanks! – bccarlso Apr 4 '11 at 23:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.