I'm trying to typeset a dictionnary, using Arabic script. I would like to create a list of words in three columns, with Arabic word in right column aligned to the right, its Polish translation aligned to the left and transcripion in italic aligned to the left. In none of this columns there would be a lot of text. I can do it with \tabular, but in this case I have to sort manually the alphabetic order. I'd like the dictionary to be sorted by Arabic words.
I've found this thread, which helped me to start, but unfortunately I'm not able to adapt it to my needs. Most important problem is sorting, since the only way I'm able to use this code is when the list is sorted by words in latin script. If I don't manage to get third column for translation, it would be lesser problem. (Well, would be also nice to get rid of the dot in each line:))
1st When I compile this:
\documentclass[twocolumn]{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\newcommand*{\glossaryname}{Dictionary}
\usepackage[nonumberlist,xindy]{glossaries}
\newcommand{\dictentry}[2]{%
\newglossaryentry{#1}{name=#1,description={#2}}%
\glslink{#1}{}%
}
\makeglossaries
\setmainlanguage{polish}
\setotherlanguage[locale=mashriq]{arabic}
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3,Mapping=arabicdigits]{Scheherazade}
\begin{document}
\dictentry{on}{\textarabic{هو}} %
\dictentry{ja}{\textarabic{انا}} %
\dictentry{pies}{\textarabic{كلب}} %
\printglossary[style=super]%
\end{document}
the dictionary is sorted by first column, the Polish one.
2nd
If I swich the arguments (to make tranlation being definition of Arabic word: \dictentry{\textarabic{هو}}{on}%) I'm getting folowing error:
! Missing \endcsname inserted.
<to be read again>
\let
l.23 \dictentry{\textarabic{هو}}{on}
%
?
3rd
I was also trying putting everything in \begin{Arabic} environement. Then the sorting is fine but in the output there were some black squares in place of Arabic words.
Reading the documentation I've found out that makeindex is a good tool for latin script and other alphabets require xindy. After I've found in xindy documentation, that Arabic script is not supported, and after I've found also on this site a following thread, so it seems that creating a list sorted by Arabic word should be possible.
I don't have to typeset this dictionary with glossaries, if there is any other tool which fits better for it. For the moment the only sorting tool I've found I could use for Arabic was make index, but it creates an index and not dictionary.
EDIT
Since I don't know where the problem may lay, I'm adding some information that might (or not) be relevant.
I'm using LaTeX on OS X 10.8.2. Since it looks like xindy can't only display arabic font, but it's able to sort it in a correct order, I've checked the content of /usr/local/texlive/2012/texmf/xindy/modules/lang/ where indeed there is no arabic. Still the sorting in my 3rd attempt was fine. (Another problem with \begin{Arabic} environement is that Arabic language column is on the left in the output, not on the right).
EDIT 2
Here is a pdf showing one page of my dictionary, made using supertabular and sorted manually.