7. Configure Applications for Arabic

7.1. Setup Editors

7.1.1. Install VIM

http://old.arabeyes.org/project.php?proj=vim

VIM supports Arabic as of version 6.2 out of the box. However, if you want to run an older version (for your own reasons), then there is the patch which has been submitted to VIM's author that is incoporated into 6.2 release. Although the VIM Arabic patch does not yet support bidirectionality, using it under mlterm will provide such support.

Download VIM-6.1 source

Go to: http://vim.sourceforge.net/download.php and cick on the 'unix' section, download the following files:

vim-6.1.tar.bz2
vim-6.1-lang.tar.gz

Uncompress files:

$ tar jxvf vim-6.1.tar.bz2
$ tar zxvf vim-6.1-lang.tar.gz
            
Download the Arabic Shaping patch

You can download the patch here: http://prdownloads.sourceforge.net/arabeyes/arabic_shape61.tar.gz?download

$ cd YOUR_VIM_ROOT_DIR
$ patch -b -p0 < arabic_shape61.patch
            
Compile VIM
$ configure  --enable-multibyte --with-features=big
$ make && make install
            
Start VIM

You can either start VIM in console mode or graphical mode. While the graphical mode has a nicer interface (to some people), it does not support bidirectional text. Running vim under mlterm will automatically give you this support.

$ ./vim -g
            
Enable Arabic within vim
:set guifont=-misc-fixed-medium-r-normal--20-200-75-75-c-100-arabeyes-1
:set encoding=utf-8
:set keymap=arabic
:set arabic
            

Note you can include the above 4 commands as-is in your ~/.vimrc file

Some important VIM commands
:set norightleft
:set rightleft
:help
:q!
            

Use Ctrl-^ to switch between Arabic and English.

7.1.2. Install Emacs-Bidi

http://www.m17n.org/emacs-bidi/index.html

The instructions to compile and install 'emacs-bidi' are all available on the above referenced website. After downloading the emacs-bidi.tar.gz package, you do:

$ tar zxvf emacs-bidi.tar.gz
$ cd emacs-bidi
$ ./configure
$ make && make install
      

You can skip the fonts part since it is the same font file that is referenced above in the 'Bitmap Fonts'. However, Emacs may not be able to automatically recognize the font in the "Font Menu". Instead you can place this in your ~/.Xdefaults

Emacs*font: -m17n-mule-medium-r-normal--20-140-100-100-p-90-iso10646-1
#Emacs*font: -microsoft-tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-6
      

You can uncomment the second line in the above example and comment the first one, if you want to use the MS Tahoma font instead. This is simply to demonstrate that you can use any font available to your system. However, I wouldn't recommend it since it slows Emacs-Bidi considerably.

7.2. Setup Mail Clients

7.2.1. Install mutt

http://www.mutt.org/

'mutt' supports UTF-8 properly as of version 1.4. If the binary distribution you got does not seem to work like you expect it to, grab the source and compile with the following:

$ ./configure --enable-locales-fix --without-wc-funcs [6]
$ make && make install
     

Also, note that mutt does not have bidi support, which means that it is best used under an x terminal such as mlterm or BiCon (for the console).

If you are unable to read certain messages, it will probably be because the person who sent you the email is using a non-standard encoding or message header. Unfortunately, those cases are very common.

7.3. Setup Word Processors

7.3.1. Setup LyX

Although LyX is not your typical word processor, it is classified as WYSIWYM (What You See Is What You Mean). There are two main packages you will need to have in order to function with Arabic. Namely LyX and ArabTeX.

Whether ArabTeX is bundled with teTeX packages may vary and depend on your distribution. For instance, Mandrake calls it 'tetex-latex-arab' whereas Debian simply calls it 'arabtex'. Check with your distribution.

Once you have both installed, create ~/.lyxrc with the following contents:

\rtl true
\kbmap true
\kbmap_primary null
\kbmap_secondary arabic

\bind "F12" "language Arabic"

\language_auto_begin false
\language_auto_end false
\language_command_begin "\begin{arabtext}"
\language_command_end "\end{arabtext}"
\language_package "\usepackage{arabtex,iso88596}\setcode{iso8859-6}"

\screen_font_encoding iso8859-6
\screen_font_encoding_menu iso8859-1
\screen_font_roman "-*-tahoma" [7]
      

Note that you can switch between English and Arabic using the F12 key.

7.3.2. Install StarOffice/OpenOffice

To be completed.

7.3.3. Install AbiWord

To be completed.



[6] '--enable-locales-fix' and '--without-wc-funcs' are NOT required if you are under Linux. These solve problems for non-Linux systems only.

[7] The fontname is taken from the full name of the font (e.g. -microsoft-tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-6).