Re: Controlling size of a tab character (U+0009)

Ambrose Li wrote:
>> Why not? That's exactly how tab is defined in CSS today. (And how 
>> most text
>> editors go about it, as far as I know.)
>>     
>
> I doubt it. Otherwise AB<tab>C and A<tab>C will never line up under
> any circumstances;
I can't remember the last time I used a text editor that didn't use a 
monospace font (where that system works perfectly). It's an idea system 
when dealing with rendering code.

For Emacs, (setq default-tab-width 4) will configure it. In Vim: set 
tabstop=4

Word Processors, on the other hand, generally use different systems. 
Something along the lines of:

    A tab stop is defined as a <length> from the left edge of content. 
(This might be different in RTL languages).

    A tab character breaks the current inline data, and resumes 
rendering at the first tab stop with a length greater then the length 
from the left edge of the content to the right edge of the previous 
character.

If we wanted to define both methods in CSS we might try something along 
the lines of:

tab-size: <integer>
tab-stops: <length> [, <length> ]*
tab-mode: stops | size

We might want to add provision for defining tab stops along the lines of 
"Every 15mm".

-- 
David Dorward
http://dorward.me.uk/

Received on Tuesday, 9 December 2008 10:07:07 UTC