Mostafa wrote:
Suppose that we have a text with a mixture of English, Arabic, and Farsi
languages. Therefore consider a paragraph that its main language is English and
it contains both Arabic and Farsi words. The current part of the source that
converts LyX to LaTeX uses the command "\R{}" for both Arabic and Farsi words.
Of course I am not a LaTeX and/or Babel expert but it seems better if LyX uses
the command "\foreinlanguage" instead. Otherwise, how can LaTeX distinguish
between these two languages?
Dov wrote:
As I answered previously, multiple languages is still problematic, at a
few different levels. I think the first thing to work out is how this
can be done at the latex level, then we can move on to seeing how it can
be done in LyX. If you already know how to do it in latex (e.g., this
\foreignlanguage that you mention), please let us know!
Farsi, Arabic, and English together in LaTeX:
ARABI package adds Arabic and Farsi support in LaTeX. In a text that uses
only Arabic and English or only Farsi and English the command "\R" works fine.
But in a text that uses both Farsi and Arabic together the command "\R" may not
work as expected (it refers to the last RTL language that is used so far).
According to the package we should use "\FR' and "\AR" for Farsi and Arabic
respctively instead of "\R".
About "\foreignlanguage":
The "\foreignlanguage" is a command defined in Babel. The way this command is
used is as follows: "\foreignlanguage{lang}{phrase}" and we use it when we want
to write e.g. arabic phrase inside a paragraph with some other language. With
ARABI package when we use the command "\foreignlanguage" the font is changed
but the characters are written from left to write. I have contacted the author
of the ARABI package. He agrees that the mentioned command should work with
ARABI, but as I said in the begining of this item the package doesn't support
the command completely. My intuition is that adding the mentioned support
should be fairly easy. For the time being we can stick to the commands "\AR"
and "\FR" that work quite well. The package IVRITEX, for Hebrew language, also
does not support "\foreignlanguage" well.
Hebrew together with Arabic:
Currently, their packages, i.e. ARABI and IVRITEX are not compatible because
they use similar macros even with the same name. For example "\R" command is
defined in both of them to write a phrase with the corresponding language
inside a Left-to-Right paragraph.
My opinion for future:
"\foreignlanguage" should be supported by both packages ARABI and IVRITEX,
and therefore used by LyX instead of "\R" or "\L" commands. This way we have a
unified approach toward using multiple languages inside LyX at least for
Arabic, Farsi, and Hebrew.
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.