Converting tabs to an unequal number of spaces

P

Patty Winter

I used to know a way to convert tab-delimited columns in
MS Word into a plain-text file with properly aligned columns.
E.g., I used that method to create this two-column page
years ago:

http://www.wintertime.com/OH/Nof60/nof60cast.txt

I was trying to do that last night in two versions of
Word X, and I could not remember how. After rummaging
around in the Word 5 folder in my Mac OS 9 applications
folder (yes, I'm still running 10.2.8 with Classic on
this Power Mac; I also have a MacBook that can't run
Classic apps), I found a document where I explained to
myself how to do that. :) Clearly I was planning ahead
for the next time I would forget how to do it. Considering
that it's been nine years since I wrote that document,
I obviously don't need this capability very often.

Anyway...the secret was a converter that went in Word 5's
"Word Commands" folder called "Text with Layout." I just
browsed through the folders for Office X and saw no such
option. (Which explains why none of the conversion options
I tried last night worked.) I just Googled a bit and didn't
find any references to the "Text with Layout" converter
after about 2003. So is it really gone, or is it hiding
somewhere (e.g. in an extras folder on the Office X
installation disc)? If it is gone, is there any way to
achieve the same result in Word X?


Thanks!
Patty

p.s. I'm very familiar with using tables in both MS Word
and HTML, so I realize they're usually a more elegant
solution than tab-delimited columns. However, this was
a situation where I wanted to post some tab-delimited
information to another Usenet group, so converting from
tab-delimited columns to Word tables and then to HTML
tables wasn't an option. I really do need plain text!
 
J

John McGhie

Hi Patty:

"Text With Layout" really has gone.

But you don't need it: the normal "Plain Text" filter will do the job for
you.

Just remember to set all the text you want to convert to 10 cpi mono-spaced
font, LEFT justified (ragged-right) and ensure each line on the screen ends
with a paragraph mark, before you save. For example, 12 points Courier.

The text converter will not perform any "processing" to line things up, so
you have to set the file up so that what you see is what you want before you
save.

Hope this helps


I used to know a way to convert tab-delimited columns in
MS Word into a plain-text file with properly aligned columns.
E.g., I used that method to create this two-column page
years ago:

http://www.wintertime.com/OH/Nof60/nof60cast.txt

I was trying to do that last night in two versions of
Word X, and I could not remember how. After rummaging
around in the Word 5 folder in my Mac OS 9 applications
folder (yes, I'm still running 10.2.8 with Classic on
this Power Mac; I also have a MacBook that can't run
Classic apps), I found a document where I explained to
myself how to do that. :) Clearly I was planning ahead
for the next time I would forget how to do it. Considering
that it's been nine years since I wrote that document,
I obviously don't need this capability very often.

Anyway...the secret was a converter that went in Word 5's
"Word Commands" folder called "Text with Layout." I just
browsed through the folders for Office X and saw no such
option. (Which explains why none of the conversion options
I tried last night worked.) I just Googled a bit and didn't
find any references to the "Text with Layout" converter
after about 2003. So is it really gone, or is it hiding
somewhere (e.g. in an extras folder on the Office X
installation disc)? If it is gone, is there any way to
achieve the same result in Word X?


Thanks!
Patty

p.s. I'm very familiar with using tables in both MS Word
and HTML, so I realize they're usually a more elegant
solution than tab-delimited columns. However, this was
a situation where I wanted to post some tab-delimited
information to another Usenet group, so converting from
tab-delimited columns to Word tables and then to HTML
tables wasn't an option. I really do need plain text!

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 
P

Patty Winter

Hi Patty:

"Text With Layout" really has gone.

Drat. :-(
But you don't need it: the normal "Plain Text" filter will do the job for
you.

By "filter," do you mean a converter available through the "Save as"
command? Because I don't see anything by that name.

There is a default paragraph style called Plain Text, and of course
I'm using that. But that doesn't affect which converters I can use
when I save the file. Is "Plain Text" a converter that I have to
track down from somewhere, such as my installation discs or the
Microsoft website?
Just remember to set all the text you want to convert to 10 cpi mono-spaced
font, LEFT justified (ragged-right) and ensure each line on the screen ends
with a paragraph mark, before you save. For example, 12 points Courier.

Yep, Courier 12 pts. is what I'm using.
The text converter will not perform any "processing" to line things up, so
you have to set the file up so that what you see is what you want before you
save.

Oh yeah, I've got my columns lined up just right. I just can't find
a way to save the file that will convert the tabs between them into
spaces. And of course, if I simply do a find-and-replace, I can only
replace each tab with a single space.


Patty
 
M

mdh

For slinging text around, I'd highly recommend using a text editor. I
use BBEdit, but the same company makes a free editor called Text
Wrangler:
http://www.barebones.com/products/textwrangler/

Steps:
- Type your text in Word, using tabs to align columns
- Paste in to TextWrangler
- select "Detab..." from the Text menu
- select how many spaces you want per tab column (ie, try "16")
- click "Okay"

See if that gets you what you want.
Spaces will be inserted to get your columns to line up at the tab
stops, assuming you are using a monospace font (courier, etc.)

Matt
 
P

Patty Winter

Hi, Matt.

Steps:
- Type your text in Word, using tabs to align columns
- Paste in to TextWrangler
- select "Detab..." from the Text menu
- select how many spaces you want per tab column (ie, try "16")
- click "Okay"

See if that gets you what you want.
Spaces will be inserted to get your columns to line up at the tab
stops, assuming you are using a monospace font (courier, etc.)

So, if I say that I want 16 spaces, will TW be smart enough to
know that 4 or 7 or 12 of those spaces are already occupied by
letters, and insert the proper number of blank spaces to make
the column total 16 characters?


Patty
 
M

mdh

So, if I say that I want 16 spaces, will TW be smart enough to
know that 4 or 7 or 12 of those spaces are already occupied by
letters, and insert the proper number of blank spaces to make
the column total 16 characters?

Yes, that's the idea.

Matt
 
P

Patty Winter

I don't have Word.X or even 2001, but in Word 2004 the equivalent "Save
As" file types have names starting with "Text Only"

Hi, Peter.

Oh yeah, I tried all four of those! None of them showed any
inclination to replace tabs with spaces.


Patty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top