[XeTeX] Typesetting Arabic in XeLaTeX

Kamal Abdali k.abdali at acm.org
Sat Feb 20 05:42:08 CET 2010


Hi Manuel,

If in your minimal example, the command
      \setmainlanguage{arabic}
is changed to
      \setmainlanguage[calendar=gregorian,locale=mashriq]{arabic},
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}
> \newfontfamily\arabicfont[Scale=1.5,Script=Arabic]{Scheherazade}
>
> \title{السلام عليكم}
>
> \begin{document}
> \maketitle
>  وعليكم السلام
> \end{document}
>
> Thanks a lot!
> Manuel
>
>
>
> --------------------------------------------------
> 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/20100219/fcf69e95/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: caltest.jpg
Type: image/jpeg
Size: 15294 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20100219/fcf69e95/attachment-0001.jpg>


More information about the XeTeX mailing list