Tutorial
Simply select some text range, and use the API – BarredText – Attach Text Bar menu item to a stretch of text.
Once the bar appears, you can add or remove text in the marked area – the bar will automatically grow or shrink as needed.
You can remove a text bar by putting the text cursor somewhere inside of the associated text and using the API – BarredText – Remove Text Bar menu item.
To remove all text bars from a story, put your text cursor in it, and use the API – BarredText – Remove All Text Bars in Story menu item. All text bars will disappear from all text frames that are part of the story.
To allow customizations, the plug-in adds a new swatch called TextBar as well as an Object Style called TextBar to any document in which you add text bars. You can change the color of all text bars throughout the document by simply adjusting the swatch.
You can change the distance from the left-hand side of the text frame, and many other properties of all text bars by modifying the object style called TextBar – the Anchored Object Options of the object style are where you can manipulate the text bar offset from the text frame.
Text bars created with this plug-in are nothing more than anchored rectangles, filled with the swatch TextBar.
At the bottom of each text bar rectangle, you’ll notice there is an additional, tiny rectangle filled with ‘None’ – this little rectangle is the end-marker rectangle. It is non-printing, and it helps the plug-in keep track of the end of the marked text range.
The text bar rectangle is anchored to the beginning of the marked text range, and the end-marker rectangle is anchored to the end of the marked text range.
If you have a multi-frame text story, the text bar will be split up into multiple bars automatically, as needed, as the marked text flows through the text frames.
You are free to resize and reposition the very first text bar frame as well as the very last end-marker frame – you can think of the very first bar rectangle and the very last end-marker frame as the bar tenders (corny pun intended).
This is handy if you want to move the bar further away from the side of the text frame, or higher up.
Or make it wider. You can also change the fill and stroke of the first text bar, and any subsequent ‘split bars’ will follow suit. Try filling the very first bar with a gradient, for example.
If you want to make the bar extend a bit further before or after the text range, you should move the very first bar rectangle to a new position. Similarly, you can make the bar extend beyond the text by manipulating the very last end-marker rectangle.
Dragging the very last end-marker rectangle results in this:
Keep in mind: if you’re manipulating a bar that’s split over multiple frames, you should only manipulate the bar tenders – in other words, the very first bar rectangle and the very last end-marker – the ‘in-between’ rectangles won’t pick up your tweaks.
For convenience, BarredText also allows you to create a sample text bar arrangement on your pasteboard. Create a text frame on your pasteboard, with a narrow rectangle frame next to it, to serve as an example of how you want the text bar positioned relative to the text frame. Fill the text bar with some color.
Now select both the sample text frame and the sample text bar so they’re both selected at the same time. Bring up the InDesign Script Label palette, and assign the script label TextBar (typed exactly like that – no extra spaces, with a capital ‘T’ and a capital ‘B’) to both selected frames.
The next text bar you create will take on a similar appearance. However, for more control you might be better off manipulating the TextBar object style.











