When laying out your page, occasionally you may come across the need to make sure another box (image or text) needs to be placed near a specific piece of text, and that it tracks that text. This means that when the text moves, the other box moves with it.
Now, you can just draw your frames and position them however you need, but the problem comes when you move your text - the frames that you need to track the text will not move.
This is where anchoring comes into play.
If you draw a frame and look in the top-right-hand corner you will see a small dark blue square…
This blue box is the anchor box and you can drag it into your text box. Whilst dragging you will see a small vertical black line, indicating the position you want your box to track.
(Your cursor has a little t added to it as you drag)
Once this is done the dark blue cursor changes to an anchor symbol. Also, if you have Show Hidden Characters on (Type menu, last command), you will see a type of yen symbol, indicating the position that your frame will track.
If you now move the text up or down the text frame, this will move the anchor symbol, and your other frame will move with it. Very nice!
However there is more - if you alt-click on the anchor symbol on the frame that is tracking your text, the various options will now appear…
You can change the Anchored object reference point, you can change the Anchored position reference point and you can also prevent manual re-positioning - very useful. The anchored object can be inside, outside or overlapping the text box.
Another very useful option is the relative to spine - choosing this will cause the anchored object to flip when moving the text box from a left-hand page to a right-hand page. Very nice!
Now recently I was asked if there was a way to do this with a vertical line, and the answer is yes you can - but you may need to zoom in to see the small dark blue box at the top of the line.
So you can anchor lines as well!
So there you have it - how to anchor objects to places within your text flow.