# [XeTeX] Typesetting Arabic in XeLaTeX

Manuel Souto Pico m.soutopico at gmail.com
Sat Feb 20 18:18:07 CET 2010

Dear Kamal,

First of all, thanks a lot for your reply and for trying to help.

I'm now know that I understood the manual and am convinced that there must
be a problem.

\setmainlanguage[calendar=gregorian,locale=mashriq]{arabic} (in the
preamble) => outputs: 2010 20, February (sic)
\textgalician{\Hijritoday} => Rabīʿ I 1431  (seems correct)
\Hijritoday => outpus: 1431 I Rab���� 6 (seems incorrect)
\textgalician{ \today}  => 20 de febreiro de 2010  (correct)
\textarabic{\today} => 2010 20, February (incorrect)

I can't run the Tex Live Utility because I'm still running Tiger. I need to
free up some space to upgrade to Leopard, I'll do that, update Tex Live and
see what happens.

Thanks a lot!
Manuel

then the date in the title appears as you want it to be, namely, "19 shubat
> 2010" in the Arabic script:
>  ۱۹ شباط ۲۰۱۰
>
> If the locale option is set to "default" (or just omitted), then the date
> appears as "19 Febrair 2010" in the Arabic script. I haven't checked the
> other locale options. Also, the following commands inserted before
> "\end{document}" produce desired results:
>
>      \textgalician{\Hijritoday} \\
>      \Hijritoday \\
>      \textgalician{ \today} \\
>      \textarabic{\today}\\
>
> An image of the program output is attached.
>
> Incidentally, before running your program (modified as above), I had fully
> updated TeX Live using the TeX Live Utility on my Mac. Perhaps, it is
> because of the most recent updates in all related packages that the calendar
> options in polyglossia are working as specified.
>
> Kamal Abdali
>
>
>
> On Sat, Feb 13, 2010 at 21:41, Manuel Souto Pico <m.soutopico at gmail.com>wrote:
>
>> Hello,
>>
>> I would just update the list on one of the problems that I had, see below.
>> I'd be grateful for any contribution or attempt to help.
>>
>>
>>>>> 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.
>>>
>>> From what the polyglossia manual says (section 5.1), I understand I
>> should get the gregorian alphabet by default. However, without defining any
>> calendar I get 1431 �afar 29 instead of ٢٠١٠ طابش ١٤ .
>>
>>
>> http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/macros/xetex/latex/polyglossia/polyglossia.pdf
>>
>> That probably means that, unless the package fails, I don't know how to
>> define the calendar. I don't know how to define the locale, either. Could
>> anyone enlighten me as to how I should use the options and end-user commands
>> listed in section 5.1?
>>
>> This is my minimal example:
>>
>> %!TEX TS-program = xelatex-xdvipdfmx
>> %!TEX encoding = UTF-8 Unicode
>>
>> \documentclass[a4paper]{article}
>> \usepackage{polyglossia}
>> \setmainlanguage{arabic}
>> \setotherlanguage{galician}
>>
>> \title{السلام عليكم}
>>
>> \begin{document}
>> \maketitle
>>  وعليكم السلام
>> \end{document}
>>
>> Thanks a lot!
>> Manuel
>>
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>>  http://tug.org/mailman/listinfo/xetex
>>
>>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20100220/3fbc2f7e/attachment.html>