Tabs, pseudo-columns, and wrapping lines
July 18, 2008 1:11 PM   Subscribe

Name. Tab. Phone number. This creates two columns. One for name and one for phone number, except--when someone has a really long name that goes past the tab setting and impinges on the phone number area. Is there some sort of tab setting that will make that long name wrap around, creating a second line within its own name area? For the record, I know I could use a table to do exactly this, but I'm reformatting a huge amount of text that is already laid out with tabs. Any advice for this poor sap who accepted the job? The text is in an InDesign document, but I can copy it to a word processor or anything that would do the trick. Thanks!
posted by largecorp to Writing & Language (13 answers total)
 
Almost all visual editor apps will allow you to define how far out the first tab is.

I don't know InDesign well enough to answer specifically for that, but in MS Word, select the whole block of text, and click once on the ruler at the top where you want the second column to start.

I'm sure InDesign will have a similar feature.
posted by jon4009 at 1:18 PM on July 18, 2008


What happens when you copy the information and paste it into a table or excel? You might find that if the format is consistent, putting the text into a table will be just that simple.
posted by prefpara at 1:19 PM on July 18, 2008


Could you break a long line onto two lines and have the second one have a blank number?
%s/^\(\w\{9\}\w\+\)\s\([^\t]\+\)\t\(\[^\t]\+\)/\1\t\3\r\2/
Or something like that.
(beginning of line) (ten or more word characters) (space) (non-tab characters) (tab) (non-tab characters) becomes (ten or more word characters) (tab) (phone number) (newline) (rest of name) (newline).

Maybe change the \w's to be something more expansive, or allow a break on a dash or space instead of just a space. The number of letters can change of course.
posted by a robot made out of meat at 1:29 PM on July 18, 2008


Yes, to get it into table format you could cut and paste it into Excel, or import it into Excel using the tab character as the column separator. Or you can bring it into Word and use the text to table function (Table->Convert->Text to Table).
posted by yarrow at 1:38 PM on July 18, 2008


I think if you open Excel, widen one column so it's really wide and then have a normal column next to it, you could copy and paste your whole list into there. Excel should interpret the tabs as instructions to send the subsequent text to the next column (and if not, try importing the list as tab-delimited text).

That first column-widening step might be unnecessary, but I remember that sometimes when I'm pasting tabbed text into Excel, things that are longer sometimes cause things to get pasted to columns farther out to the right than everything else, which is a pain to fix. So maybe if the target column is wide enough, it won't happen. Can't remember but you can do the import idea above, too, in which case the only thing that should matter is the delimiter. At one delimiter per line, you should wind up with only two columns. I think the list might need to be saved txt or csv format first for that to work.

Once it's in Excel, you could then copy and paste into Word as a table. I know you said no tables but I think you meant you didn't want to start from scratch in a table. This method just converts it all, hopefully in only two steps. Copy from Indesign and paste into Excel. Copy from Excel and paste into Word.

Then you could make the table borders invisible if you didn't want it to look like a table. But everything would autowrap at the position you choose (by setting that column's width) and remain lined up with the corresponding numbers, unaffected by wrapping.
posted by Askr at 1:39 PM on July 18, 2008


Seconding Askr - a spreadsheet was the first thing that came to my mind - and adding that if you don't have Excel, the Google Docs spreadsheet should work for you.

As Askr says, you can copy and paste the whole shebang when you're done - or you can export it as tab-delimited or comma-delimited text.
posted by kristi at 1:52 PM on July 18, 2008


I would copy and paste it into Word to make sure that the line breaks stay in, and then copy and paste into Excel - otherwise you run the risk of one reeeeaaalllly wide, one line table.
posted by The Light Fantastic at 1:55 PM on July 18, 2008


This is the best, fastest way:

Select all your raw text in InDesign

NAME1 [TAB] PHONE1
NAME2 [TAB] PHONE2

and so on. Copy and paste that into Notepad. You now have a tab-delimited file.

Open that .txt in Excel, where it will import in 2 rows and X colums. Save as whatever.xls. Close it. Go back into InDesign, File > Place > whatever.xls. You now have a handy InDesign table you can modify to your heart's content.
posted by Optimus Chyme at 3:52 PM on July 18, 2008


Word has a "convert text to table" feature that can convert tab-separated text to an actual table object; I'd be shocked if InDesign didn't also. You shouldn't need to round-trip it through Excel.
posted by kindall at 4:13 PM on July 18, 2008


In fact... just remembered I have a trial of InDesign still installed on my laptop:

1) Select the tab-separated text
2) Choose "Convert Text to Table" from the Table menu

The name will now wrap within its individual cell. You can resize the table columns as desired.
posted by kindall at 4:15 PM on July 18, 2008 [1 favorite]


If you want to use InDesign to do this, you can define a paragraph style, then set your tab stops (it's one of the sub-options under paragraph styles).
posted by Civil_Disobedient at 4:35 PM on July 18, 2008


Largecorp, I lied. I lied to you. My way is not the best or fastest way. It is a dumb way to do it. Kindall is correct, and I apologize to both you and him for being wrong. I consider myself a pretty solid InDesign guy and this thread will be a shameful memory.
posted by Optimus Chyme at 5:08 PM on July 18, 2008


Response by poster: You guys are great! I didn't even know that InDesign could convert to a table. I'll give that a try first and take it from there.
d
posted by largecorp at 6:20 PM on July 18, 2008


« Older Not a whole lot of shakin' goin' on   |   Describing social anxiety and panic attacks. Newer »
This thread is closed to new comments.