unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs + unicode + hebrew + bidi
@ 2008-10-30  6:42 Pavel
  2008-10-30 15:56 ` Drew Adams
  2008-10-30 21:25 ` Eli Zaretskii
  0 siblings, 2 replies; 10+ messages in thread
From: Pavel @ 2008-10-30  6:42 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Hi everybody, i would like to know if the combination i mentioned in the
subject is possible.
I would like to write Hebrew latex documents in emacs, but unfortunately the
Hebrew is reversed.
Thanx

[-- Attachment #2: Type: text/html, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: emacs + unicode + hebrew + bidi
  2008-10-30  6:42 Pavel
@ 2008-10-30 15:56 ` Drew Adams
  2008-10-30 21:25 ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2008-10-30 15:56 UTC (permalink / raw)
  To: 'Pavel', help-gnu-emacs

	Hi everybody, i would like to know if the combination i mentioned in the

	subject is possible.
	I would like to write Hebrew latex documents in emacs, but unfortunately

	the Hebrew is reversed.

[Plain text, not HTML, please for this mailing list.]

I don't have the answer, but you might get some help from the Emacs Wiki by
searching for "bidi". Emacs wiki:
http://www.emacswiki.org/cgi-bin/wiki/SiteMap.

Searching for bidi there gives:
http://www.google.com/cse?cx=004774160799092323420%3A6-ff2s0o6yi&q=bidi






^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
  2008-10-30  6:42 Pavel
  2008-10-30 15:56 ` Drew Adams
@ 2008-10-30 21:25 ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-10-30 21:25 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 30 Oct 2008 08:42:22 +0200
> From: Pavel <cyberkm@gmail.com>
> 
> Hi everybody, i would like to know if the combination i mentioned in the
> subject is possible.

Unfortunately, not yet.  You can have the 1st three, though ;-)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
       [not found] ` <15mdnR00Q9IwKZLUnZ2dnUVZ_tudnZ2d@sysmatrix.net>
@ 2008-11-04  2:55   ` B. T. Raven
  2008-11-04  3:05     ` B. T. Raven
  0 siblings, 1 reply; 10+ messages in thread
From: B. T. Raven @ 2008-11-04  2:55 UTC (permalink / raw)
  To: help-gnu-emacs

B. T. Raven wrote:
> Pavel wrote:
>> Hi everybody, i would like to know if the combination i mentioned in the
>> subject is possible.
>> I would like to write Hebrew latex documents in emacs, but 
>> unfortunately the
>> Hebrew is reversed.
>> Thanx
>>
> 
> As a kludge you could type everything left to right and then apply this 
> function to the whole buffer:
> 
> (defun reverse-bstring (str)
>   (apply #'string (nreverse (string-to-list (buffer-string))))
> 
> There is something perverse about it since it doesn't seem to need to be 
> passed a string but, anyway, evaluating it in *Scratch* produces this:
> 
> "
> ))))gnirts-reffub( tsil-ot-gnirts( esrevern( gnirts'# ylppa(
> )rts( gnirtsb-esrever nufed(
> 
> ..reffub nwo s'elif taht ni txet eht retne neht ;;
> ,f-C x-C htiw elif taht tisiv ,elif a etaerc ot tnaw uoy fI ;;
> ..noitaulave psiL rof dna ,evas ot tnaw t'nod uoy seton rof si reffub 
> sihT ;;"
> 
> Ed

Of course you want to do this line by line, not to the whole buffer, 
since in Hebrew and Arabic you start at the back of the book but not at 
the bottom of the page. O well, back to the drawing board.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
  2008-11-04  2:55   ` B. T. Raven
@ 2008-11-04  3:05     ` B. T. Raven
  0 siblings, 0 replies; 10+ messages in thread
From: B. T. Raven @ 2008-11-04  3:05 UTC (permalink / raw)
  To: help-gnu-emacs

B. T. Raven wrote:
> B. T. Raven wrote:
>> Pavel wrote:
>>> Hi everybody, i would like to know if the combination i mentioned in the
>>> subject is possible.
>>> I would like to write Hebrew latex documents in emacs, but 
>>> unfortunately the
>>> Hebrew is reversed.
>>> Thanx
>>>
>>
>> As a kludge you could type everything left to right and then apply 
>> this function to the whole buffer:
>>
>> (defun reverse-bstring (str)
>>   (apply #'string (nreverse (string-to-list (buffer-string))))
>>
>> There is something perverse about it since it doesn't seem to need to 
>> be passed a string but, anyway, evaluating it in *Scratch* produces this:
>>
>> "
>> ))))gnirts-reffub( tsil-ot-gnirts( esrevern( gnirts'# ylppa(
>> )rts( gnirtsb-esrever nufed(
>>
>> ..reffub nwo s'elif taht ni txet eht retne neht ;;
>> ,f-C x-C htiw elif taht tisiv ,elif a etaerc ot tnaw uoy fI ;;
>> ..noitaulave psiL rof dna ,evas ot tnaw t'nod uoy seton rof si reffub 
>> sihT ;;"
>>
>> Ed
> 
> Of course you want to do this line by line, not to the whole buffer, 
> since in Hebrew and Arabic you start at the back of the book but not at 
> the bottom of the page. O well, back to the drawing board.

You could then demarcate the above text as a region and then run M-x 
reverse-region on it. It's still a kludge but it might work on 
multi-byte buffers.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RE: Re: emacs + unicode + hebrew + bidi
@ 2008-11-04 15:13 cyberkm
  2008-11-04 21:04 ` James Cloos
  0 siblings, 1 reply; 10+ messages in thread
From: cyberkm @ 2008-11-04 15:13 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3031 bytes --]

The numbers are from left to right
Here is some example of hebrew (it look correctly in gmail/firefox)
זאת הודעה בעברית
המספרים נכתבים משמאל לימון לדוגמה: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,  
150, 123456789

On Nov 4, 2008 3:06pm, Bourgneuf Francois  
<francois.bourgneuf@groupe-mma.fr> wrote:
>
> Just a precision, in
> arabic and hebrew both text and numbers are written right to
> left.
>
> In western languages text
> is written left to right and numbers right to left.
>
> You can't tell the value
> of the left digit of a number if you havent read how many digit are at his
> right.
>
> We solve additions from the right to the
> left.
>
>
>
> Bour9
>
>
>
>
>
>
>
> De :
> help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org
> [mailto:help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.org]  
De
> la part de cyberkm@gmail.com
> Envoyé : mardi 4 novembre 2008
> 12:45
> À : help-gnu-emacs@gnu.org
> Objet : Re: Re:
> emacs + unicode + hebrew + bidi
>
>
>
>
> Thank you, but unforunatly, it is not a solution -
> Hebrew is not
> simple right to left
> its a BI-Directional. Then text is written from rtl
> the number ltr, what
> about the punctuation signs, spaces and etc..
> the
> bi-di code is very complex
>
> On Nov 4, 2008 5:05am, "BT Raven"
> nihil@nihilo.net> wrote:
> > BT Raven wrote:
> >
> >
>
> > BT Raven wrote:
> >
> >
> > Pavel wrote:
> >
>
> >
> > Hi everybody, i would like to know if the combination i
> mentioned in the
> >
> > subject is possible.
> >
> > I
> would like to write Hebrew latex documents in emacs, but unfortunately
> the
> >
> > Hebrew is reversed.
> >
> > Thanx
> >
>
> >
> >
> >
> >
> >
> > As a kludge you could
> type everything left to right and then apply this function to the whole
> buffer:
> >
> >
> >
> > (defun reverse-bstring
> (str)
> >
> > (apply #'string (nreverse (string-to-list
> (buffer-string))))
> >
> >
> >
> > There is something
> perverse about it since it doesn't seem to need to be passed a string but,
> anyway, evaluating it in *Scratch* produces this:
> >
> >
> >
>
> > "
> >
> > ))))gnirts-reffub( tsil-ot-gnirts( esrevern(
> gnirts'# ylppa(
> >
> > )rts( gnirtsb-esrever nufed(
> >
> >
>
> >
> > ..reffub nwo s'elif taht ni txet eht retne neht ;;
> >
>
> > ,fC xC htiw elif taht tisiv ,elif a etaerc ot tnaw uoy fI
> ;;
> >
> > ..noitaulave psiL rof dna ,evas ot tnaw t'nod uoy seton
> rof si reffub sihT ;;"
> >
> >
> >
> > Ed
> >
> >
>
> >
> >
> > Of course you want to do this line by line, not to
> the whole buffer, since in Hebrew and Arabic you start at the back of the  
book
> but not at the bottom of the page. O well, back to the drawing board.
> >
>
> >
> >
> >
> > You could then demarcate the above text as
> a region and then run Mx reverse-region on it. It's still a kludge but it
> might work on multi-byte buffers.
> >
>

[-- Attachment #2: Type: text/html, Size: 4475 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
       [not found] <mailman.2871.1225811718.25473.help-gnu-emacs@gnu.org>
@ 2008-11-04 16:29 ` Richard Riley
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Riley @ 2008-11-04 16:29 UTC (permalink / raw)
  To: help-gnu-emacs

"Bourgneuf Francois" <francois.bourgneuf@groupe-mma.fr> writes:

> I just wanted to point that "english numbers" (i.e. arabic) numbers are in fact right to left.
> We're used to use them so we think they are written left to right but it's wrong. Even though you don't
> realize it, you read numbers from the right to the left.

I most certainly do not. germans say numbers (wholöe numbers) right to
left. But I certainly read this left to right

10001,23


>
> I disagree with what's written in the Wikipedia article.
> For example, in the number 1.234 how can you tell 1 represents one thousand ? Because there are
> three digits on the right. You have to read the right part of the
> number first.

because of the dot?

>
> Other example, which of these calculations is the easiest to solve :
>
>   12345
> +23
>
> Or
>
>  12345
> +     23
>
> Regards
> Bour9  
>
>> -----Message d'origine-----
>> De : 
>> help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.fr@gnu.or
>> g 
>> [mailto:help-gnu-emacs-bounces+francois.bourgneuf=groupe-mma.f
>> r@gnu.org] De la part de Jonathan Groll
>> Envoyé : mardi 4 novembre 2008 15:56
>> À : help-gnu-emacs@gnu.org
>> Objet : Re: Re: emacs + unicode + hebrew + bidi
>> 
>> On Tue, Nov 04, 2008 at 02:06:09PM +0100, Bourgneuf Francois wrote:
>> >Just a precision, in arabic and hebrew both text and numbers 
>> are written right to left.
>> >In western languages text is written left to right and 
>> numbers right to left.
>> >You can't tell the value of the left digit of a number if 
>> you havent read how many digit are at his right.
>> >We solve additions from the right to the left.
>> > 
>> 
>> In all the Hebrew I've seen numbers were left to right:
>> http://en.wikipedia.org/wiki/Hebrew_punctuation#Math
>> 
>> Regards,
>> Jonathan
>> 
>> 
>> 
>> 
>
>

-- 
 important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday.  ~Dennis Gabor, Innovations:  Scientific, Technological and Social, 1970


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
  2008-11-04 15:15 Bourgneuf Francois
@ 2008-11-04 20:35 ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-11-04 20:35 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 4 Nov 2008 16:15:04 +0100
> From: "Bourgneuf Francois" <francois.bourgneuf@groupe-mma.fr>
> 
> I just wanted to point that "english numbers" (i.e. arabic) numbers
> are in fact right to left.  We're used to use them so we think they
> are written left to right but it's wrong. Even though you don't
> realize it, you read numbers from the right to the left.

You are simply distorting the widely accepted meaning of left-to-right
text and right-to-left text.  Please don't, this confuses even more an
issue that is already confusing.

The point here is _not_ how we decide whether a digit 1 means one,
ten, or one hundred.  The point is that in a text such as

  here are few digits: 1, 2, 3, 4, 5

the digit 1 is read before the digit 2, 2 before 3, etc.

In bidirectional languages such as Hebrew, a similar utterance would
be displayed like this:

                              1, 2, 3, 4, 5 :STIGID WEF A ERA EREH

That is, the digits are still written _and_ read left-to-right, unlike
the text that precedes them, which is read right-to-left.

> I disagree with what's written in the Wikipedia article.

That is your prerogative, but please try not to confuse others.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
  2008-11-04 15:13 RE: Re: emacs + unicode + hebrew + bidi cyberkm
@ 2008-11-04 21:04 ` James Cloos
  2008-11-04 21:28   ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: James Cloos @ 2008-11-04 21:04 UTC (permalink / raw)
  To: help-gnu-emacs

|> The numbers are from left to right

Another way to wor what he says is that the (so-called) Arabic digits
are big-endian when read LTR and little-endian when read RTL, and that
regardless of how one actually thinks of them the representation of
integers is inherently little-endian.

Decimals in (-1.0,1.0), OTOH, are inherently big-endian.  And so the
full range of the Reals written in decimal form are middle-endian.

IIRC, the digits as we know them were invented (probably in India) in a
culture which wrote RTL and were not reversed when adopted into the LTR
scripts.  Which suggests there is an etymological basis for his thesis.

Nonetheless, most of the worl currently thinks of them as exclusively
big-endian LTR, no matter what script they are used with.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: emacs + unicode + hebrew + bidi
  2008-11-04 21:04 ` James Cloos
@ 2008-11-04 21:28   ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-11-04 21:28 UTC (permalink / raw)
  To: help-gnu-emacs

> From: James Cloos <cloos@jhcloos.com>
> Copyright: Copyright 2008 James Cloos
> OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B  63E7 997A 9F17 ED7D AEA6
> Date: Tue, 04 Nov 2008 16:04:23 -0500
> 
> |> The numbers are from left to right
> 
> Another way to wor what he says is that the (so-called) Arabic digits
> are big-endian when read LTR and little-endian when read RTL, and that
> regardless of how one actually thinks of them the representation of
> integers is inherently little-endian.

Endianness has nothing to do with LTR and RTL languages.

And you are wrong saying that numbers are little-endian when read RTL,
because many RTL languages read number LTR.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-11-04 21:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-04 15:13 RE: Re: emacs + unicode + hebrew + bidi cyberkm
2008-11-04 21:04 ` James Cloos
2008-11-04 21:28   ` Eli Zaretskii
     [not found] <mailman.2871.1225811718.25473.help-gnu-emacs@gnu.org>
2008-11-04 16:29 ` Richard Riley
  -- strict thread matches above, loose matches on Subject: below --
2008-11-04 15:15 Bourgneuf Francois
2008-11-04 20:35 ` Eli Zaretskii
     [not found] <mailman.2486.1225374867.25473.help-gnu-emacs@gnu.org>
     [not found] ` <15mdnR00Q9IwKZLUnZ2dnUVZ_tudnZ2d@sysmatrix.net>
2008-11-04  2:55   ` B. T. Raven
2008-11-04  3:05     ` B. T. Raven
2008-10-30  6:42 Pavel
2008-10-30 15:56 ` Drew Adams
2008-10-30 21:25 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).