Making a Vertical Line to the Side of a Paragraph

LGM wrote:

I am using a stroke line on the side of text to indicate new changes. This can be done for each change, but when new text is added, the line won’t necessarily match up the intended location. What’s the best way to do this?

InDesign offers several methods of creating vertical lines next to text… none of them are automatic, but they’re not terrible workarounds.

But before I describe how to get vertical bars (or vertical strokes, or whatever you want to call them), I should point out that if you’re trying to find a way to keep track of changes made in a document, you should take a look at CtrlChanges from Ctrl-ps. It’s not perfect, and I haven’t used it yet, but it looks very promising for a 1.1 product.

Okay, with that out of the way, let’s look at three ways you can make a vertical stroke along the left edge of a paragraph.

Rule Above/Below

One of the easiest methods for creating a vertical rule is the ol’ Rule Above technique. Just make a really, really thick Rule Above (or below) and adjust its vertical and horizontal offsets so that it’s placed in the proper position:

The main problem with this technique is that you need to change the rule thickness (weight) depending on how many lines there are in the paragraph. However, you can automate it to a degree by making multiple paragraph styles, each based on a single style — such as rule_1line, rule_2line, rule_3line, and so on.

Another problem with this is that it won’t break across two columns or pages. Of course, that’s not really a problem because none of these techniques will do that! If you want that, you should probably just draw the lines in yourself with a crayon. It would be easier than doing it in InDesign. Sigh.

Single-Cell Table

Another option is to select a paragraph (but don’t select the final, invisible return character at the end of the paragraph) and choose Table > Convert Text to Table. This converts the paragraph into a single-celled table. Tables are cool because they can auto expand as you add or remove text. Now you just need to tell InDesign to stroke one side of the table and not the other three sides, which you can easily do in the Stroke panel:

Note that the tricky thing here is to get the text to align properly. Here’s how I did it above:

  1. I added a left cell inset of 1 pica, which pushed the text to the right.
  2. I added the stroke along the left side of the table, and removed the default stroke from the other sides.
  3. I set the space before and space after in the Table Options dialog box so that the table seemed to fit between the other two paragraphs (above it and below it). To be honest, the values in the space before and after on tables remain a mystery to me. I must figure that out someday. Perhaps for an obscure feature of the week-eek-eek.
  4. I made the cell width 1 pica wider (in the Control panel or the Table panel)
  5. Then the big trick: I set the horizontal alignment of the paragraph that contains the table (not the paragraph inside the cell!) to Right Aligned. That forces the right edge of the table to align with the normal right indent (edge of frame here), and pushes the vertical rule outside to the left.

This is one of those effects that takes a while to get right the first time, but then is much easier after that.

Again, the cool thing here is that the rule gets longer/shorter as the paragraph changes. But it still won’t break from one column to the next.

Anchored Object

The last method I’ll share here is the anchored object method. In many respects, this is the easiest: Just draw a line, cut it to the clipboard, paste it in at the beginning of the paragraph, then adjust the Anchored Options settings to make it a “custom” object in the proper location. Once you do this, you can easily save it as an Object Style so it’s quick to apply next time.

The nice thing about this is that even though it won’t automatically adjust in size, it’s easy to adjust manually: Just drag the bottom handle of the line up or down.

Tags
Related Articles
Comments

17 Comments on “Making a Vertical Line to the Side of a Paragraph

  1. If you want to add vertical line in a gutter between two columns in a table….

    - Create a thin column that will be used as a gutter between two other columns
    - rotate the content to 90° left (Table feature)
    - Insert a Right Indent Tab and fill it with dots as leaders for instance
    - even is the size of the text frame changes, the vertical lines’ length changes real time

  2. @Branislav: I don’t get the point. Do you mean creating a SECOND text frame, rotating it, filling it with dots as leaders and then manually place the thin column in the gutter space of the MAIN text frame? Because, this way the second thin frame doesn’t reflect any changes in the main one at all. But I’m sure I’m wrong, something missing…

  3. The only problem with the Table method is when you have foot notes, as they don’t carry over once in a table… Sure by now with all of InDesign’s tricks and effects, this could be an option?

  4. David, didn’t you have another way of doing this, using the “pipe” key, i.e., “|”, somehow?

  5. I think this tip or trick would help the most the magazines and newspapers….
    And it’s helpful and easier especially in ID CS4 (__________>rotating the page)

  6. @Anne-Marie: No, actually, this was a real email sent in that sparked me to totally procrastinate what I was supposed to be working on and write this whole thing up instead.

    @Eugene: Yes, I talked about putting vertical lines in tables with the pipe in this blog post.

  7. “set the horizontal alignment of the paragraph that contains the table (not the paragraph inside the cell!) to Right Aligned.”

    That’s pure genius, that is — I wish I had thought of that!

  8. I generally do these manually, by drawing a vertical line. I’ll use the baseline grid for alignment (length & vertical position) of the line, lock the position of the text box, and use distribute spacing to ensure my lines are always the same distance from the side of the text. (or indeed use a master page ruler and align all my vertical lines to that).

    Many ways to skin the same cat I’m sure.

    Drawing a line makes it easier to adjust colour, width and position in my opinion.

  9. @shailendra: This is a good question to bring up in the forums (click Forum in the navigation bar up top). However,you could probably do it with two different paragraph styles, each using the Next Style feature so that you can apply 1 then 2 then 1 then 2….

  10. Hi Dave!
    About that last plug-in “barred text”!
    Its a great plug-in but it wont make it possible when you have a placeholdertext in a textframe with a paragraphformat and BarredText code ad XML-code connected to it!

    I´ve tried to connect the Barred Textline to a placeholdertext with correct p-format then tag it with markup-tags for XML. Export the text as XML.

    Get rid of the more lines in the tagged formatted text and make it just one line with barred text plug-in who will correct the vertical line after one line.
    Themn when trying to place a tagged XMl-text inside this frame with the vertival barred text line connected to the paragraph. It now wont sclae the line vertically as text flows inside the paragraph-format and inside the tags for barred text and XML.tags!
    Anyone know a good solution to this problem?
    Best Mikael

  11. I really love the “Rule above” method. It’s incredibly easy to accomplice, plus it actually scales alongside the height of the paragraph! I usually feel more at home with some simple html/css when I try to accomplish these things for my website-hobbyism and since I’m a packaging designer and usually only need Illustrator and Photoshop for my job, I never knew how to accomplish such a neat trick in Indesign.

    It’s nice to know that such an elaborate program has it’s share of simple and easy to achieve “tricks” :)

  12. The best way I found to add a vertical line to the left or right edge of a text box is to add an inner shadow with a size of “0″ and a y-offset of “0″ and an x-offset the width of the line you want. Add a little inset spacing so the text is not touching the line.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>