perl-unicode

Re: In-Band Information Considered Harmful

1998-10-25 12:30:12
Chaim Frenkel writes:
IZ> What *I* had in mind that "almost 3/4 of" is represented by the string

IZ>    "almost 34 of"
IZ>            ```
IZ>            xyz

IZ> with markups:

IZ>      x = start fraction
IZ>      y = boundary between numerator and denominator;
IZ>      z = end of fraction

IZ> between chars.

I would have thought that it would be represented as:

      almost 34 of
             ||
             |+ denominator \
             |              +--- rational_number
             +- numerator   /


I consider defining the regions directly better than looking for
boundaries to determine the regions.

I do not care about implementation.  As far as any editing operartion
leaves numberator and denominator adjacent to each other.  This is
automatically so if the *implementation* uses 3 boundaries to get the
regions.

*Semantically* having something between y and z means being in
"region" (or whatsoever) "denominator".

IZ> The situation with
IZ> eText is allevivated by the decision to make the markup have width, so
IZ> there is no question whether inserting of "5" between "3" and "4" in
IZ> the above example results in 35/4 or 3/54.

One could remember from which direction the insertion is happening.
After the '3' or before the '4'.

How would 

    substr($text, 3, 0) = "5"
know?

Ilya

P.S.  And you are mixing fractions and rational numbers.  4/5 = -8/-10
      as numbers, but they are different fractions.



<chaim>
-- 
Chaim Frenkel                                      Nonlinear Knowledge, Inc.
chaimf(_at_)pobox(_dot_)com                                          
+1-718-236-0183