Replace tab character with spaces

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Replace tab character with spaces

Post by gcotterl »

How many space characters are needed to replace each tab character?
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

A tab character does not correspond to a fixed number of spaces: it's an instruction to move the cursor to the next tab stop.

Tab stops can be anywhere, but are often at every eighth or fourth column. Many text editing programs, including TextPad, allow tab stops to be set at any positions, regular or irregular, for a document or document class.

So the number of spaces an individual tab character represents depends on its own position and the postion of the next following tab stop.
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

Thanks.
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

I personally consider three spaces equivalent to a tab. But it's whatever you want it to be.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

A tab is not equivalent to any fixed number of spaces. It's a control character that tells the displaying device or program what to do with the cursor.
Post Reply