View on GitHub


The multilingual framework to localize LaTeX, LuaLaTeX, XeLaTeX


The Arabic language is available for pdftex, xetex, and luatex, but the preferred engine is the latter, because of its unique features for bidirectional texts, not requiring explicit mark up.

The recommended basic settings for a monolingual Arabic document in luatex is (please, note your browser might not be rendering correctly the source code):


\usepackage[arabic, provide=*, bidi=basic, layout=counters.tabular]{babel}


الموسيقى أو الموسيقا هي فن مؤلف من الأصوات والسكوت عبر فترة زمنية،
ويعتقد العلماء بأن كلمة الموسيقى يونانية الأصل، وقد كانت تعني سابقا
الفنون عموما غير أنها أصبحت فيما بعد تطلق على لغة الألحان فقط.


There is a complete example (with tables, columns, a figure, a description, etc.) in the repository (tex, pdf). It uses the tentative algorithm for justification with kashida.


Numerals are best entered directly in the desired form, but you may still need some conversion because LaTeX uses internally the Western Arabic ones. With luatex there are two ways to map the latter to the locale numerals, passed as option to \babelprovide:


The transform applies the transliteration system devised by Yannis Haralambous for dad. Not yet complete, but sufficient for many texts.

This method to enter Arabic can be useful if you only need a few words in this language:


\usepackage[bidi=basic, ngerman]{babel}
\babelprovide[transforms =]{arabic}


Eine Präposition (\foreignlanguage{arabic}{Harof}) ist per
Definition \foreignlanguage{arabic}{maboniY+}.



Arabic support in pdftexis provided by the external package arabi, which has been devised for documents written in Arabic.

For a few words or sentences in a non-Arabic document, you may prefer to declare a language from scratch in the following way:

\usepackage[bidi=default, english]{babel}
\usepackage[LAE, T1]{fontenc}

Then \foreignlanguage and \selectlanguage can be used in the usual manner, but very likely you will need some manual intervention (for example, numerals). Sadly, with this procedure text cannot be copy-pasted (and cmap works only to some extent).