is now part of CreativePro.com!

Linking Numbers in a List to Numbers on an Image

5

I just received a question from a reader asking if there is any way to link numbers in a list to numbers over an image, so that if the numbers in the list change, the numbers on the image change, too. The answer is: It depends on how much work you’re willing to put into it!

There are a couple of ways to do this, but I wanted to share one way to do it that popped into mind: text variables.

Here’s an example that I threw together quickly:

Numimage1

In this image, the numbers on the image are linked to the numbers in the list. To do it, I first created a different character style for each item in the list:

Numimage2

Notice that the numbers in this list are real numbers (not from automatic paragraph numbering).

Then I created a different text variable for each number, each one pointing to the proper character style. For example, my list2 text variable looks for any text on the page tagged with the character style “list2”:

Numimage3

Finally, I inserted each of these text variables in the proper text frames over the image:

Numimage4

Now, whenever I change the values in the list, the text variables update, too:

Numimage5

Actually, the text variables don’t update immediately. Text variables only update when the screen redraws. So to force the numbers to update, you have to zoom in or out, or change pages, or use the “redraw screen now!” keyboard shortcut: Command/Ctrl+Alt+/ (slash).

Obviously, if you aren’t going to update the numbers very often, it’s not worth all this work. But you can see how a little work upfront could save a lot of time downstream in a situation where edits had to be made frequently!

There are other ways to do this, including the Edit > Place and Link feature. How would you do it?

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • Nice! I puzzled over that email when it came in. I thought the solution would have to involve a numbered list that spanned stand alone text frames. But then my brain stopped there. :D

  • Mike Rankin says:

    Great use of text variables!

    Like Anne-Marie, I thought this would involve numbered paragraphs, but this solution is much better than that. With a list spread over unlinked frames the numbering is a bit fragile since its tied to the order of frame creation. So if you cut and paste frames, you mess up the numbering. Not so here.

  • Text variables are the way to go if the circumstances are right. I used them in a very similar situation, and they worked very well. In that instance, there were many illustrations with accompanying legends. Fortunately, there was never more than one on any given page, or variables wouldn’t have been useful.

    A snippet made from a full set of label variables also saved tons of time on that project; much faster than Copy/Paste for a collection of small text frames like this.

    In my limited experience (I’ve run into this exactly once!), the number of edits/changes demanded after the fact is small, and if there were only one or two pictures I’d do it by hand.

  • Nagaraj Muthu says:

    If the targetted textframes are move to the next page or anywhere during the re-composition means non-values are resides on the images. I think the second option is Cross-References features in InDesign. Any one helps us for cross reference handle.

  • Pat says:

    I had been trying to figure out exactly how to do this when your article was published. Great timing! It works for my situation, but because our key is lengthy it requires a lot of character styles. Also, the key can change as many as 5 times in the document which means I have to create sets of character styles. But it does work. Because the key also has data that isn’t highlighted I created the key with everything highlighted and placed it on a separate page and layer, then set the layer to not print. I’ll delete the page in the PDF. But, as Mr. Muthu suggested, I also wondered if this could be handled with cross references because I think that would allow us to use the key across different documents. But I couldn’t figure it out. Thanks so much for the timely article which, in any event, saves me a lot of time doing changes?after a rather lengthy setup.

  • >