This content has been marked as final. Show 5 replies
This can be done in CS4 using the following technique:
1. Create a character style named Null and have it apply a fill color of None.
2. In your paragraph styles, use a GREP style to seek out any white space (you can be more selective if you like) and apply the Null character style.
Now, when you apply underline to a selection, assuming that the underline setup is to apply the text color to the underline, the spaces will appear to have no underline -- it actually is there, but it is invisible.
In CS3, you could run a GREP to do the same thing to all spaces and it would still work, but it would be static and could interfere with editing because any new word you typed immediately after a space would pick up the text color of None.
I don't believe there's a direct way to do it in Indesign. There are some shortcuts that help.
In CS4 you can set up a GREP search to find Words, set Change Format to change "basic character format" to include underline, then do a replace all in selection. You can set up keyboard shortcuts for some of this, but a script would be even more convenient.
Unfortunately, with the normal "Find" function, the "character" wildcard also seems to find spaces, and there isn't a "whole word" wildcard, so this won't work in CS2 or CS3.
The best I can think of at the moment is: Underline the whole text. Set Find What to find spaces (^w), leave Change To blank but in the Change Format box, turn off underline on Basic Character Formatting. Close the dialog box. Then, placing the cursor at the beginning, press shift-F3 (the standard shortcut for "Replace with Change To text and find next") for each space in the sentence. You can zip through the section fairly quickly.
This is really a job for scripting -- the script should change all characters in the selection to underline, then change all white space characters in the selection back to non-underline. Scripts can be assigned a keyboard shortcut for ultimate convenience.
I just tried a variant of Dave's trick (I created a character style called "Spaces" that is underlined but the underline color is set to "none"). Then I defined my body paragraph style so that it contains a GREP Style to set all spaces to style "Spaces." Presto! When I underline the text, all of the words are underlined and the spaces are skipped.
A second paragraph style could be created for solid underlines that go through the text, it would just omit the GREP style.
Larry, you need to upgrade to CS4 :-)
Oh, and as for Larry's complaint about option-command-W -- command-W closes the document. option-command-W closes all open documents. If you only have one document open, it appears to do the same thing, but it's really a different command.
OMG are you kidding me?
This has been available in Quark for 20 years with a single button.
This makes me want to GREP all over my keyboard.
I think I will set this document in QuarkExpress rather than mess up my keyboard.