I am stunned. Let me explain.
I have been using Illustrator since version 6 or so to mock up web pages, it is my wireframing tool of choice. The two biggest defects have always been a lack multi-page support and no way to underline text.
The workaround for the former was to either create a giant canvas and use page tiling (good for printing), use a different file for each page (good for linking into InDesign), or use layers (good for sharing items across pages in the same position, e.g., a navigation bar). I use a mixture of layers and files depending on my needs.
Not being able to underline was always the real issue. I realize it is not typographically “correct” because it actually means italics, but thanks to Mosaic that ship has sailed. Plus, why does Adobe allow underlining in InDesign and Photoshop but not Illustrator? This is inexplicable to me.
The workarounds for underlining were unappealing at best. The hardest solution was to manually place a 1pt line under the text you want underlined. The problem of course, if you change the copy, you need to change the line. To say this is a pain is one hell of an understatement. The easier solution was to use a different color and leave it at that, alas this (obviously) didn’t work when printing in black and white, but it was the easiest (and the one that I always used).
There are a few other workarounds that I’ve investigated but discarded. For example, I found a plug-in that automagically adds the 1pt strokes to selected text objects, but it doesn’t work in Illustrator CS and costs $25, so forget that. Plus, it doesn’t solve the editing text problem. At a previous job someone created a font that looked like Verdana and had the underlining as part of the design. But it was buggy, resulted in postscript errors, and didn’t work for sharing files with other people who didn’t have the font.
But forget the workarounds. Problem solved. Well, it is still a workaround, but it at least a clean one.
It turns out that Illustrator does support underlining, but doesn’t provide a command to do it. Is this like disabling the blink tag in HTML to prevent people from making bad pages? Adobe doesn’t want people to underline text out of some desire to improve design?
Enough background—time for the solution.
It turns out that if you paste underlined text from Photoshop into Illustrator the underlining comes with it. You can use the eyedropper to apply the text properties, including underlining to other text objects.
But this is where it starts getting good, with Illustrator CS, Adobe introduced character styles. You can then define a style for underline that you can then apply to other objects with one click. Plus, if you can make the style just underline, and not color, typeface, size, bold, italics, etc. Just a clean, one-click “make underline” button. Clicking the “no character style” style will remove the underline, without altering any other text properties.
To get you started, I’ve created an Illustrator file with just the style. Just open the Character Styles palette, click the little triangle and select “Load character styles…”, select the supplied Illustrator file, and you’re good to go!
Download the file: Underline text in Illustrator.
Update: Douglas Bowman improved on my solution by deleting a bunch of other text properties that I neglected to remove. Now it longer applies kerning, case, tracking, etc. The file has been updated for your downloading pleasure. Take that, Adobe.
Update #2: Doug points out an issue, but has a workaround for the workaround. I’ll let him explain it:
I discovered that within a bounded text box, the underline gets it’s color from the first character in that text box, not the character the style is applied to. And yes, that’s specific: the first character. Second character and on doesn’t matter or have any effect. So if you have underlined text that’s a different color than the first word (character) in that paragraph, you can create a space as the first character, set it’s horizontal scale to 1% or any percentage that stays unnoticeable, and give the space the color you want the underline within that paragraph to be. Fun, huh?
Update #3: Yet another update. Doug has done a great job of documenting the whole underlining trick.