Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!TAURUS.BITNET!finkel From: finkel@TAURUS.BITNET Newsgroups: comp.sys.amiga Subject: Re: typing right-to-left Message-ID: <8911091258.AA17328@virgo.tau.ac.il> Date: 9 Nov 89 12:58:43 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Lines: 170 Newsgroups: comp.sys.amiga Subject: Re: typing right-to-left Summary: Expires: References: <1989Oct22.191705.5211@contact.uucp> <15984@pollux.UUCP> <1249@lakes Sender: Reply-To: finkel@virgo.UUCP (Udi Finkelstein) Followup-To: Distribution: Organization: Tel-Aviv Univesity Math and CS school, Israel Keywords: word processors, AmigaTeX, LaTeX In article <12764@polya.Stanford.EDU> rokicki@polya.Stanford.EDU (Tomas G. Rokic > >There's one additional consideration---line breaking. If I type a roman >alphabet, and then a hebrew alphabet (using caps for the latter), I want >to type > >a b c d e f g h i j k l >m n o p q r s t u v w x >y z A B C D E F G H I J >K L M N O P Q R S T U V >W X Y Z > >Now, the Hebrew should be read right-to-left, so what I want to see on >output (or on the screen) is > >a b c d e f g h i j k l >m n o p q r s t u v w x >y z J I H G F E D C B A >V U T S R Q P O N M L K >Z Y X W For various reasons, it will appear as: a b c d e f g h i j k l m n o p q r s t u v w x y z Z Y X W V U T S R Q P O N M L K J I H G F E D C B A I haven't seen yet a hebrew WP which will handle mixed hebrew-english sentences __spawning more than one line__ intuitively. Anyhow, your example is irrelevate, because even though it contains hebrew and english, it assumes that the cursor moves from left to right! the more common situation is a hebrew WP in which the cursor is moving from right to left, and in which you have to insert an english sentence: L K J I H G F E D C B A X W V U T S R Q P O N M q r s t u v w x y z Z Y e f g h i j k l m n o p a b c d As you can see, the english sentence is 'a bit' mixed. This can be solved, but I never saw a WP which handled this correctly. Since the most common usage of mixed hebrew/english documents ( from self experience ) is a ducument which is 99% hebrew, and has only a few isolated english words inside ( usually these are names or un-translatable technical terms ), There are very rare situations in which we have a group of more than one english words inside a hebrew document, spawning more than one line. BTW, not even all the 'heavy' WP's used in newspapers handle this correctly. >(whether that last line is left or right justified is a separate issue.) >I might be satisfied to type it in as above. But if I wanted to insert >a word between the two, such as `and', what I get is > >a b c d e f g h i j k l >m n o p q r s t u v w x >y z and J I H G F E D C B A >V U T S R Q P O N M L K >Z Y X W > >Now the word processor has to be smart enough to `do the right thing', and >give me > >a b c d e f g h i j k l >m n o p q r s t u v w x >y z and H G F E D C B A >T S R Q P O N M L K J I >Z Y X W V U > >(ie, fill right-to-left in the hebrew sections.) This can all be done >with a postpass. You always type the hebrew left to right. On output, >*after* the formatting, any line of hebrew is reversed before it is >printed. > >I could be all wet in everything I'm saying here, but this is what I >understand the problem to be . . . > >-tom Most of what you wrote is correct, but you assumed that we type hebrew from left to right in some kind of 'insert' mode. This is unnatural. Hebrew WP's move their cursor from left to right, and pressing RETURN moves the cursor to the rightmost column of the next line. There are a few approaches to designing a Hebrew/English Word processor user interface, but generally all the good Hebrew/English WP's share a few common things: 1. The WP has 2 modes for cursor movement. in one mode, the cursor starts on the rightmost column and moves to the left as words are being typed. pressing RETURN would move it to the rightmost column on the next line. To visualize this, take your english WP, and place a mirror in front of your monitor, and look at the display through the mirror. You will get the idea... 2. the WP has 2 modes for character sets. a hebrew/uppercase engligh mode, and an upper/lowercase english mode. On simple WP's switching the mode actually switches the character sets. on more advanced WP's, all 3 types of characters are dibile on the screen at once, but switching modes changes the keyboard bindings of the keys, so that hebrew can be typed by pressing the letter keys, and english by using the SHIFT key. 3. On any decent hebrew WP, it is possible to type any combination of hebrew/digits/english characters in it's natural reading direction. for example, suppose we have a hebrew word 'DCBA' ( remember, it's right to left! ). When I want to type '123456789 DCBA', I will press the keys according to the natural flow: A,B,C,D,1,2,3,4,5,6,7,8,9 . and I will see ( '_' denotes the cursor ) Every line here is what displayed on the screen after every key is pressed: _ an empty line. _A The cursor moves one character left after pressing A. _BA _CBA _DCBA 1_DCBA Note that the digits are 'pushed' into the text. 12_DCBA . . 123456789_DCBA Now, If I will press 'A', again, I will see: _A 123456789 DCBA Since I finished typing the number, the cursor will move to the end of the line, since this is where the hebrew letter 'A' is supposed to appear. This can be discussed much further, but it no longer has anything to do with the Amiga ... Tom, I hope you can understand now what kind of clumsy support we have for hebrew inside TeX documents! A friend of mine, Asaph Zemach, ( asaph@taurus.BITNET ), has written a hebrew/english WP , which demonstrates these principals excellently. In my opinion, this WP has the best user interace on any hebrew WP I ever saw ( and I saw dozens of them on different machines ). By 'user interface' I only mean the way the cursor moves and places the words on the screen. the rest of the program is not so polished, but since it's only V0.32, this is forgiven ( and we don't have any alternative hebrew WP on the Amiga anyhow! ) Asaph, if you read this, please comment! Udi ------------------------------------------------------------------------------- Udi Finkelstein | Bitnet: finkel@taurus.bitnet or finkel@math.tau.ac.il Tel Aviv University | Internet: finkel%taurus.bitnet@cunyvm.cuny.edu Israel | UUCP: ...!psuvax1!taurus.bitnet!finkel -------------------------------------------------------------------------------