All guides
Advanced

Arabic and right-to-left text

Write Arabic, or mix Arabic and English, with right-to-left layout and proper fonts.

It works without setup in CiteTeX

Type Arabic anywhere and press Compile: CiteTeX notices it and compiles with LuaLaTeX, right-to-left text and the Amiri font, without changing your file. Mostly Arabic documents become right-to-left; Arabic words inside English text are handled too. The log offers Add the Arabic setup to write it into your file so it also works outside CiteTeX.

The setup, written out

With LuaLaTeX, babel handles Arabic: bidi=basic runs the Unicode bidirectional algorithm (so English inside Arabic needs no markup) and onchar switches to the Arabic font automatically. A whole English paragraph in an Arabic document goes in otherlanguage.

\usepackage[bidi=basic]{babel}
\babelprovide[import, main, onchar=ids fonts]{arabic}
\babelprovide[import, onchar=ids fonts]{english}
\babelfont[arabic]{rm}[Renderer=HarfBuzz]{Amiri}
Try it: the full example compiles as it is. Open as a project
Next guide
Journal and conference templates