[Tex/LaTex] The best way to write arabic in beamer

arabicbeamer

I'm used to create Arabic Beamer presentations with the arabtex package, but with arabtex there are many environments (like enumerate) can not be used, for this I would like to write arabic using new packages such as arabi or polyglossia .

I tried writing my presentations with these new packages but I always set problems of alignment especially with the polyglossia package .

My aim is to learn the best and easier way to create beamer presentation with arabic script with examples of that

my MWE with arabtex

\documentclass{beamer}  
\usetheme{Warsaw}
\usepackage{graphicx}
\usepackage{arabtex}

\author{Me}
\title{Arabic in Beamer}

\begin{document}
\novocalize
\begin{frame}{}
\titlepage
\end{frame}

\begin{frame}{\begin{arabtext}
al-^sry.hT al-'awlY
\end{arabtext}}

\begin{arabtext}
$-1$ n.s `rby\\
$-2$ n.s `rby
\end{arabtext}

\begin{enumerate}
\item \RL{n.s `rby}
\item \RL{n.s `rby}
\end{enumerate}
\end{frame}

\end{document}

Best Answer

This is not an answer but a clarification of the question, a clarification which won’t fit into a comment but which may put our wizards on the right track.

Here’s a small example (I use the 20pt option only to make the image big and clear):

% compile with xelatex
\documentclass[20pt]{beamer}
\usepackage[utf]{arabxetex}
\newfontfamily\arabicfont[Script=Arabic]{Scheherazade}
\begin{document}
\begin{frame}
  \frametitle{\textarab{الشريحة الأولى}}

  \begin{arab}
    \begin{enumerate}
    \item نص عربي
    \item نص عربي
    \end{enumerate}
  \end{arab}
\end{frame}
\end{document}

output of above code

The problem is that, although the words go from right to left, as they should, they’re in the left part of the frame instead of the right.

\usetheme{Singapore} will put the title in the center, where it looks fine, but the enumeration is still on the left. And \usetheme{Warsaw} makes the enumeration disappear altogether. So I suspect that each theme will need its own patches…

Until a solution for beamer appears, you can make something suitable for presentations, though not as pretty as beamer, with texpower and the screen option of the geometry package:

% compile with xelatex
\documentclass[20pt]{extarticle}
\usepackage[screen]{geometry}
\usepackage[display]{texpower}
\usepackage[utf]{arabxetex}
\newfontfamily\arabicfont[Script=Arabic,Scale=2]{Scheherazade}
\pagestyle{empty}
\begin{document}
\begin{arab}
\section*{\textarab{الشريحة الأولى}}
\begin{enumerate}
\item نص عربي\pause
\item نص عربي
\end{enumerate}
\end{arab}
\end{document}

output of second code sample