> Hi Dekel!
> 
> What I don't understand (and we already asked you ;) is why you need a
> special number atribute. Shouldn't this non be automatic in the display
> mechanism? So why do you need the attribute numbers are [0-9] that's
> easy (but probably you want something else I just cannot see it :)

I've already explained it before, but here is a more detailed overview of
the number problem:

Hebrew is written from Right to Left. However, numbers are written from
Left to Right, so if you type "abc 123 def" [a..f are Hebrew letters]
then the display should be "fed 123 cba".

The above is complicated by the fact that a number can contain characters
other than digits. For example, in "abc 123.4" the period is part of the
number, while in "abc 123." the period is not part of the number.
The rules for deciding the scope of the number are defined by the Unicode
standard.

Most Hebrew word-processor/text editors works as follows:
The text is stored in the memory/on disk in the same order it is typed
(logical order) without additional information.
Before a text row is displayed on screen, it is analyzed
and converted to the correct display order (visual order), using the Unicode
rules.

What I want for LyX is a different approach:
The number will be marked by special LyXFont attribute, (both in memory 
and on disk).
The markup is performed either manually (by the user), or semi-automatically:
while inserting new chars, their type (number/not a number) is decided, but
the automatic decision can be overrided by the user.

Why ????

1. It seems like a good idea to store in the file format explicit markup for
number.

2. With the automatic approach, you can not (easily) turn it off, or change
the rules (because the meaning of the text is dependent in the rules).
With my approach, it can be done.

3. I think that it is easier to implement in LyX.
Implementing the automatic approach requires doing changes in
LyXParagraph::SimpleTeXOnePar, and LyXParagraph::SimpleTeXOneTablePar
(since in the latex output, a number should be enclosed by \beginL .. \endL).
With my approach, this is not needed (the \beginL .. \endL are generated by
LyXFont::latexWriteStartChanges & LyXFont::latexWriteEndChanges).

Reply via email to