[XeTeX] Typesetting Arabic in XeLaTeX

Manuel Souto Pico m.soutopico at gmail.com
Mon Feb 1 04:32:32 CET 2010


Thank you very much for your anser, Vafa.

2010/2/1 Vafa Khalighi <vafa at users.berlios.de>

>
>
>> 1) I've seen that I can either use polyglossia or arabxetex (but not both
>> at the same time, as they are not fully compatible, or at least I couldn't
>> use the Arabic environment if I had the package arabxetex declared in my
>> preamble). Anyway, the question is: which one of the two would you recommend
>> and why?
>>
>
> I recommend polyglossia partially  because  you want to write in utf8 and
> not in transliteration mode and partially because polyglossia has got more
> support like it let you have various kinds of arabic dates, typographic
> convention and etc.
>

Thanks. We'll see.

>
>
>>
>> 2) I've been trying with no success to set the spacing between lines to 2
>> or 1.5. I've declared package setspace and then used the doublespace or
>> onehalfspace environments, but they only affect the spacing between
>> paragraphs, but not between lines of the same paragraph (in Arabic, of
>> course). What is wrong?
>>
>
> I use \usepackage[onehalfspacing]{setspace} and I do not have a problem as
> you described. Could you perhaps please send a minimal example that does not
> work for you?
>

I've tried \usepackage[onehalfspacing]{setspace} in the preamble and then I
defined the onehalfspacing in the body, but no visible changes. You will
find a minimal example attached.


>> 3) How can I get the date in Arabic in the title? I mean like ٣٠ كانون
>> الثاني ٢٠١٠ or ٣٠ فبراير ٢٠١٠, which are just January 30, 2010 in Arabic,
>> not the Hijra date according to the lunar calendar... When I used babel long
>> ago I would put arabic as the last item in the list of parameters of the
>> package declaration, but what should I do with arabxetex or polyglossia?
>> I've tried \date{\arab \today} and \date{\begin{Arabic}\today\end{Arabic}},
>> respectively, but the result is far from good.
>>
>
> I think polyglossia has some options for this but I am not sure. Read the
> manual of polyglossia and it should contain all the details.
>

Well, I did, but it's not clear to me. Section 5 talks about
language-specific options and commands but I don't know how to use them or
where to put them. I've tried all around. It seems what I need is
calendar=gregorian but that's the default option already.

See the files attached.

>
>

>> 4) How can I write section or chapter titles in Arabic? Just
>> \section{\arab قسم} or \section{\begin{Arabic}قسم\end{Arabic}},
>> respectively won't work.
>>
>
> No, that is not the right way. When you use polyglossia, if you have
>
> \setmainlanguage{arabic}
> \setotherlanguage{english}
> There is no need for this and you can simply have
>
> \section{قسم}
>

Right, so it seems you can only have that if Arabic is the main or default
language. Not very flexible, but it seems logic. ± Solved.

>
>
>>
>> 5) I can have arab and Arabic environments (for full paragraphs) both with
>> arabxetex and polyglossia. However, I can only get a short passage in Arabic
>> using \arab{كلمة} in the former, but not using \Arabic{كلمة آحرِى} in the
>> latter. What would be the right syntax?
>>
>
> See polyglossia manual.
>

Yes, I re-read the relevant section (3 Language-switching commands) and I
realized what I was doing wrong. I was trying to use \textarab{} as the
instatiation of \text<lang> but the correct command is \textarabic{}.
Solved.

Thank you so much!
Best regards, Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20100201/9f7d9db9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template_polyglossia_1roman_2arabic_minimalex.tex
Type: application/x-tex
Size: 889 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20100201/9f7d9db9/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template_polyglossia_1roman_2arabic_minimalex.pdf
Type: application/pdf
Size: 29792 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20100201/9f7d9db9/attachment-0001.pdf>


More information about the XeTeX mailing list