On Fri, Apr 14, 2000 at 11:35:33AM +1000, Allan Rae wrote:
> On Thu, 13 Apr 2000, Dekel Tsur wrote:
>
> > (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).
>
> Isn't this the same as switching to any LTR language from the RTL language
> (Hebrew in this case). Are \beginL...\endL output in those cases? Or is
> this something extra that turns the environments contents around?
No. The latex command to switch from RTL to LTR is \L{}.
The difference between \L{} and \beginL...\endL is that the former changes
the font, while the latter doesn't.
> I still can't see why we can't just do:
[deleted]
> ...
> \ltr-toggle (I can't remember the right format)
> 123.4
> \ltr-toggle
> ...
In the current code, switching between Hebrew and English (or other languages)
is done by the \lang command
\lang hebrew
Some Hebrew...
\lang american
Some English..
etc.
> That way numbers and ltr languages are handled by the same code -- since
> numbers (at least in arabic and roman form) are ltr. The automatic
> recognition of numbers being _input_ should be done at _input_ time not
> output time.
Again, there should be a distinction between an English number and a
Hebrew/Arabic number since:
1. Hebrew numbers use different font than English numbers (this is if you use
the default Hebrew fonts that come with the Hebrew latex. However, it is
possible to use a multi-charset font (e.g. a TrueType font)).
2. Arabic numbers use different glyphs than English numbers (the digit 4
looks like epsilon, 5 looks like o, etc.)
3. The correct order of a line is different if you use Hebrew/English numbers.
For example, (suppose that upper case is Hebrew, and lower case is English)
If the (logical) text is "I SAW 12 monkeys"
Then, if 12 is a Hebrew number, then the text should be rendered
monkeys 12 WAS I
while if 12 is an English number, the text should be
12 monkeys WAS I
4. Using Babel+elatex, numbers should be enclosed by \beginL..\endL,
while using ArabTeX, they should appear without any extra commands.
> So unless \beginL...\endL is specific to numbers I think you're making a
> special case of something that isn't. And even if it is specific to
> numbers isn't switching to ltr going to achieve the same result?
Using a special LyxFont attribute for numbers is not necessary, but it seems
to simplify few things, so this is why I'm thinking of adding it.