The best way to write arabic in beamer
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}
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}
Recent developements of babel
(from v3.23) enabled to change direction of writing implicitely depending on script with option bidi=basic
, it allow to overcome many obstacles to write a right to left beamer presentation.
Some minor changes remained I collected in a class beamer-rl
which call babel with option bidi=basic
and need lualatex
% compile with lualatex
% you can pass more babel option like this
% \documentclass[babel={<babel options>}]{beamer-rl}
\documentclass{beamer-rl}
\babelprovide[import=ar, main]{arabic}
\babelfont{sf}{Amiri}
\usetheme{Warsaw}
\begin{document}
\begin{frame}
\frametitle{الشريحة الأولى}
from wikipedia
اللُّغَة العَرَبِيّة هي أكثرُ اللغاتِ تحدثاً ونطقاً ضمن مجموعةِ اللغاتِ السامية، وإحدى أكثر
اللغات انتشاراً في العالم، يتحدثُها أكثرُ من 467 مليون نسمة، ويتوزعُ متحدثوها في
الوطن العربي، بالإضافة إلى العديد من المناطق الأخرى المجاورة كالأهواز وتركيا وتشاد
ومالي والسنغال وإرتيريا وإثيوبيا وجنوب السودان وإيران
\pause
\begin{enumerate}[<+-| alert@+>]
\item
نص عربي
\item
نص عربي
\end{enumerate}
\pause
\begin{itemize}[<+-| alert@+>]
\item
نص عربي
\item
نص عربي
\end{itemize}
\end{frame}
\end{document}