On Mon, Feb 21, 2000 at 08:24:24PM +0100, Lars Gullik Bj&resh;nnes wrote: > [EMAIL PROTECTED] writes: > > | I have a new linux oprtingsystem software(SuSe ver. 6.3), > | this included a Lyx software. I would like to use the lyx > | editor for reading / writing arabic text > > This is not as easy as it sounds. However we recently added support > for hebrew in LyX, and AFAIK that is written in the same manner as > arabic. However the RTL support is at present hardcoded to hebrew and > this has to change before arabic can be written with LyX. Actually, it is possible to use LyX 1.1.5cvs to write Arabic documents (instructions given bellow). However, there are several limitations to this hack: 1. BIGGEST LIMITATION: The text rendering in the LyX screen doesn't use ligatures. (In Arabic, the glyph of a letter is dependent on the position of the letter in the word. To support this in LyX, LyXText::draw should be modified. However, the iso8859-6 encoding doesn't contain the necessary glyphs for ligatures, so I don't know how to do it). 2. There are many problems caused by the limitations of arabtex. Maybe it is better to use omega instead of arabtex. 3. xdvi isn't updated automatically after buffer-typeset command (Why?) Finally, I want to note that I can eliminate the need for the arablatex script hack, by doing few modification to the LyX code (by adding several lyxrc options), but I'm not sure if it is worth the work. ------------------------------------------------------------ Using Arabic with LyX: You need to have LyX 1.1.5cvs (with Hebrew support) and arabTeX. 1. Copy the attached arablatex script to your path. Copy the attached arab-article.layout to ~/.lyx/layouts/ 2. Create an Arabic keymap file for LyX, saving it as ~/.lyx/kbd/arabic.kmap 3. Add the following lines to ~/.lyx/lyxrc \kbmap true \kbmap_primary null \kbmap_secondary arabic \latex_command arablatex \font_encoding default \bind "F12" "font-rtl" \rtl true \screen_font_encoding iso8859-6 \screen_font_roman "-*-???" \screen_font_sans "-*-???" \screen_font_typewriter "-*-???" \screen_font_menu "-*-???-bold-r" \screen_font_popup "-*-???-medium-r" (replace the ??? by appropriate font names) 4. Start LyX, select the Arabic article class in the document layout popup, and select default input encoding. 5. Use F12 to switch between Arabic and English
#!/usr/bin/tcsh set f = $1:r perl -pe "s/\\usepackage{babel}//g;\ s/\\sethebrew/\\begin{arabtext}/g;\ s/\\unsethebrew/\n\\end{arabtext}/g" <$f.tex >! _$f.tex latex _$f mv -f _$f.dvi $f.dvi
#% Do not delete the line below; configure depends on this # \DeclareLaTeXClass[arabart]{article (Arabic)} # Arabic article textclass definition file. # Author: Dekel Tsur <[EMAIL PROTECTED]> Input article Preamble \usepackage{arabtex,iso88596} \setcode{iso8859-6} EndPreamble