Path: utzoo!attcan!uunet!husc6!mailrus!purdue!decwrl!labrea!polya!shap From: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Newsgroups: comp.sys.mac.programmer Subject: Re: Text editor help Keywords: TextEdit, Tabs Message-ID: <4290@polya.Stanford.EDU> Date: 5 Oct 88 19:11:39 GMT References: <2476@rti.UUCP> <2580001@hpausla.HP.COM> <3845@Portia.Stanford.EDU> <18288@apple.Apple.COM> Reply-To: shap@polya.Stanford.EDU (Jonathan S. Shapiro) Organization: Stanford University Lines: 55 In article <18288@apple.Apple.COM> casseres@Apple.COM (David Casseres) writes: >In article <3845@Portia.Stanford.EDU> duggie@Jessica.stanford.edu (Doug Felt) writes: > >>Tabs are tricky. Who knows what tabs mean when you mix left-to-right >>and right-to-left text (arabic)? What standards are there for tabs >>that are not identically spaced? Inquiring minds want to know. The best implementation of tabs that I have seen [note: *opinion*] is in MicroSoft Word. Ignoring the merits of the word processor otherwise, MicroSoft has introduced a notion of a "typed" tabstop. Tabstop are exactly one of: left justifying (the usual kind) right justifying decimal aligning (right just. if no period is in it) centering These take priority over the paragraph formatting (centered, l/r/both justfied). In a situation with multiple tabstops, the tabulation binds (in English text) to the next tabstop to the right. Now for word processing in general, this is fine. For Outlines and programs, this is not so great. Tabs (at least in the ways that I use them) have two meanings: incremental indentation (e.g. C indentation style, outlines) positional fixation (e.g. MS Word tabs) The problem here is that one desparately wants *both* (e.g. emacs-style C comments in C-indented code). Note that these two kinds of tabs are *distinct*, and probably should be bound to different keys. The binding of tabs in mixed left to right (LR) and right-to-left (RL) languages is a difficult problem. I propose the following conventions for RL tabs: When the current language is right-to-left, should tabulate to the next tab stop to the *left*. MS-word style tabs should continue to be justify as they dofor LR languages. The problem for mixed text isn't particularly solvable in general - tabs are not *user-visibly* directional. By applying the above rules and having a way to specify the directionality of the tabs, one could solve most problems as efectively as one does in strictly LR text. The only other real alternative I can see is adding an attribute to each tabstop indicating whether it applies to LR/RL/both text. That would seem to me (without having tried it) to be counterintuitive in the common cases. Jon