\documentclass[hyperref=unicode]{beamer} \usepackage{hologo} % pdflatex, xelatex, lualatex logos \usepackage[nil,bidi=basic-r,layout=counters]{babel} \babelprovide[import=ar-DZ, main]{arabic} \babelprovide[import,language=Default]{english} \babelfont{sf}{Amiri} \usepackage{beamer-rl} % Themes without Navigation Bars %\mode{\usetheme{default}} %\mode{\usetheme{boxes}} %\mode{\usetheme{Bergen}} %\mode{\usetheme{Boadilla}} \mode{\usetheme{Madrid}} %\mode{\usetheme{AnnArbor}} %\mode{\usetheme{CambridgeUS}} %\mode{\usetheme{EastLansing}} %\mode{\usetheme{Pittsburgh}} %\mode{\usetheme{Rochester}} % Themes with a Tree-Like Navigation Bar %\mode{\usetheme{Antibes}} %\mode{\usetheme{JuanLesPins}} %\mode{\usetheme{Montpellier}} % Themes with a Table of Contents Sidebar %\mode{\usetheme{Berkeley}} %\mode{\usetheme{PaloAlto}} %\mode{\usetheme{Goettingen}} %\mode{\usetheme{Hannover}} % Themes with a Mini Frame Navigation %\mode{\usetheme{Berlin}} %\mode{\usetheme{Ilmenau}} %\mode{\usetheme{Dresden}} %\mode{\usetheme{Darmstadt}} %\mode{\usetheme{Frankfurt}} %\mode{\usetheme{Singapore}} %\mode{\usetheme{Szeged}} % Themes with Section and Subsection Tables %\mode{\usetheme{Copenhagen}} %\mode{\usetheme{Luebeck}} %\mode{\usetheme{Malmoe}} %\mode{\usetheme{Warsaw}} \usepackage{tikz} \title{The beamer-rl package} \author{Salim Bou} \institute[]{% {\color{blue} Repository: } https://github.com/seloumi/beamer-rl \par {\color{blue} Bug tracker: } https://github.com/seloumi/beamer-rl/issues } \date{{\selectlanguage{english} \today}} \setbeamercovered{transparent=10} \newtheorem*{thm}{نظرية.} \begin{document} \begin{frame} \titlepage \end{frame} \begin{frame} \frametitle{\selectlanguage{english}\contentsname} \tableofcontents \end{frame} \section{Introduction} \begin{frame}[fragile] \frametitle{Introduction} Creating beamer presentation for right to left language (like arabic) using \hologo{pdfLaTeX} or \hologo{XeLaTeX} still poses many problems due to bugs not currently resolved especially for colors and hyperlinks The \hologo{LuaTeX} team set solutions for these issues thanks to them and to \textit{Javier Bezos} for his works on the package \verb|babel| and \verb|bidi| writing \end{frame} \section{How to use beamer-rl} \begin{frame}[fragile] \frametitle{How to use beamer-rl} \selectlanguage{nil} \begin{verbatim} \documentclass{beamer} \usepackage[nil,bidi=basic-r,layout=counters]{babel} \babelprovide[import=ar-DZ, main]{arabic} \babelfont{sf}{Amiri} \usepackage{beamer-rl} \mode{\usetheme{Warsaw}} \begin{document} ... \end{document} \end{verbatim} \end{frame} \section{Examples} \subsection{Blocks} \begin{frame}[fragile] \frametitle{Blocks} {\selectlanguage{nil} \verb:\setbeamertemplate{blocks}[default]: } \setbeamertemplate{blocks}[default] \begin{block}{Lorem} \selectlanguage{nil} On 21 April 1820, during a lecture, Ørsted noticed a compass needle deflected from magnetic north when an electric current from a battery was switched on and off. \end{block} {\selectlanguage{nil} \verb:\setbeamertemplate{blocks}[rounded][shadow=true]: } \setbeamertemplate{blocks}[rounded][shadow=true] \begin{block}{أورستد} لاحظ هانز أورستد في 21 أبريل 1820 وهو يُعد أحد التجارب أن إبرة البوصلة تنحرف عن اتجاهها نحو الشمال عندما كان يغلق ويفتح التيار في دائرة كهربائية يُعدها. \end{block} \end{frame} \subsection{enumerate, itemize} \begin{frame} \frametitle{enumerate, itemize} \begin{enumerate} \item فيزياء تطبيقية \item فيزياء تجريبية \item فيزياء نظرية \end{enumerate} \begin{itemize} \item فيزياء تطبيقية \item فيزياء تجريبية \item فيزياء نظرية \end{itemize} \end{frame} \subsection{hyperlinks} \begin{frame} \frametitle{hyperlinks} \begin{itemize} \item<1-> First item. \item<2-> Second item. \item<3-> Third item. \end{itemize} \hyperlink{jumptosecond}{\beamergotobutton{الرجوع إلى الشريحة الثانية}} \hypertarget<2>{jumptosecond}{} \end{frame} \subsection{Theorems} \begin{frame} \frametitle{Theorems} \framesubtitle{The proof uses \textit{reductio ad absurdum}.} \begin{thm} There is no largest prime number. \end{thm} \begin{proof} \begin{enumerate}[<+-| alert@+>] \item Suppose $p$ were the largest prime number. \item Let $q$ be the product of the first $p$ numbers. \item Then $q+1$ is not divisible by any of them. \item But $q + 1$ is greater than $1$, thus divisible by some prime number not in the first $p$ numbers.\qedhere \end{enumerate} \end{proof} \end{frame} \subsection{zooming} \begin{frame}[fragile] \frametitle{zooming} \framezoom<1><2>[border=2](2cm,2cm)(2cm,2cm) \pgfimage[height=5cm]{example-image} \selectlanguage{nil} \begin{verbatim} \framezoom<1><2>[border=2](2cm,2cm)(2cm,2cm) \pgfimage[height=5cm]{example-image} \end{verbatim} \end{frame} \section{Some notes} \begin{frame}[fragile] \frametitle{Some notes} \begin{itemize} \item The \verb:beamer-rl: package modify the definition of \verb:\blacktriangleright: so it have the same meaning as\verb:\blacktriangleleft:, if you need to use the original command you can use \verb:\blackTriangleright: \item In some cases you need to use \verb:\babelsublr: command from \verb:bebel: package to insert a left to right text within your right to left text. \end{itemize} \end{frame} \end{document}