Jump to content

Replacing spaces with tabs in Word 2013


skylark53
 Share

Recommended Posts

I have a block of text with short items separated only by spaces (typically 5 per line). I am trying to replace all spaces with tabs. In principle this is simple to do: find/replace all " " with "^t" (omitting quote marks).

 

I have cleared all tabs in my document and set the default tab size to 0.5cm. The above procedure 'works' but the tabs that are introduced are variable in size, some very large.

 

My expectation is that 'replace all' will do the substitution on a line-by-line basis, replacing all tabs on that line with the tabs I've set - in this case all 0.5cm.

 

What am I doing wrong? Thanks..

Link to comment
Share on other sites


You are not doing anything wrong :) but you most probably have a number of "TAB stops" in the document (very likely different in different lines).

The "feature" of Tabs is that if there are no tab stops a tab will expand to the given size, but if there is a tab marker it will align to that.

 

 

jaclaz

Link to comment
Share on other sites

Thank you, Jaclaz.  I was not aware that tabs and tab stops are two different things. How do I clear them so that my 'new tab markers' (introduced with ^t) produce tab gaps of 0.5cm?

Word makes it a tad bit more complex than needed as tab stops are a property of each paragraph, but if you select the whole document it should work as well, see here:

http://www.techrepublic.com/blog/microsoft-office/how-do-i-delete-all-tab-stops-in-a-word-document/

 

jaclaz

Link to comment
Share on other sites

Hmmm. I believe I have set the tabs for the whole document. the very large tabs (presumably set by the previous editor of this document) have gone away, which is progress!

 

But replacing "- " with "^t" still produces variable-size gaps between words that were previously separated by a single space. Sea attached screenshots for an example document. (The forum will not let me upload the original docx for you to play with.)

post-139476-0-49461700-1442930470_thumb.

post-139476-0-30007600-1442930476_thumb.

post-139476-0-15560200-1442930490_thumb.

Edited by skylark53
Link to comment
Share on other sites

Well, the document seems OK to me, a Tab by default expands to (usually) up to 8 spaces, and there is a sort of "default hidden" grid (when no explicit Tab stops are set) which Word counts in cm.
 
Example, you have:
I've removed the ....
For cooking oil use ...
This guide illustrates ...
 "removed" , "cooking" and guide are aligned vertically because before them there is either "I've" or "For" or "This" (i.e. three or four characters long words).
The Tab expands in the first and third line to 4 spaces and in the second to 5 spaces and the result is aligned (but actually is much more complicated than that as you are using a proportional font, so different characters may count as either "less than one" space or "more than one").
"removed" is wider than "cooking" and because of this the latter is followed on "second virtual 8 characters stop" by "oil" whilst the former goes beyond that and the following "the" is on "third virtual 8 characters stop".
Then "cases", "a" and "the" are again vertically aligned, and later "pertain" "wet" and "that" are again aligned on the same vertical line.
 
I hope to have been clear enough. :unsure:
 
It is perfectly "normal" :yes:.
 
In a nutshell:

  • Spaces are intended to separate words.
  • Tabs are intended to align words to tab stops (implied or explicit)

You should use them for what they are intended.
 
And in Word you should use the button with the symbol to see (and let other people see ;)) spaces, Tabs and paragraph/new line/line feed.

 

jaclaz

Link to comment
Share on other sites

Thanks again, Jaclaz.

 

In after.jpg you probably noticed that:

 

1.  The space between any two items varied from a single space bar character to around 1cm.  But you point out that this is "normal" for Word, i.e. it's my expectation that's wrong.  I'm expecting that tabs set at 0.5cm will yield text items spaced uniformly by 0.5cm.

 

2.  After the first few lines, a 'paragraph hang indent' behaviour had been introduced. The paragraph indenting etc had not been manually changed but when I looked, hang indent had somehow been set to 0.5cm - presumably by the tab substitution? (This behaviour did not go away when I changed to landscape fomat.)

 

The indenting behaviour is of course undesirable; I don't want to have to go back and fix all the spurious indenting in a 50-page article that has some bona-fide indenting that needs to be preserved.

 

Why are simple things never simple? :huh:

Edited by skylark53
Link to comment
Share on other sites

By the way, the font is just Arial 11pt. I always thought Arial is truetype?  (How do you tell whether it is TT [in Word 2013]?)

 

 

Can you suggest a better font to try the tabs thing on?

Edited by skylark53
Link to comment
Share on other sites

One thing is truetype (or "odf" or "bitmap" which is the file format of the font) another one is the typographic characteristics of a font.

Arial (like most fonts used nowadays) is a "proportional font" (as opposed to "monospace" or "fixed width" ones).

https://en.wikipedia.org/wiki/Monospaced_font

An "i" takes LOTS less space than a "W" in Arial:

i

W

but:

An "i" takes the same space as a "W" in Courier:

i

W

 

Only seemingly unrelated:

http://www.msfn.org/board/topic/141893-fonts-in-console-window/

 

 

The general issue however is that you expect a TAB to be a "fixed size" in Word (or in similar word processors) and this simply is not the way TABs behave in word processors.

 

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...