2

I am using polyglossia to write Arabic language presentation and I have a problem with the footline which doesn't accept the Arabic language. Although I have tried a lot of answers about the footline, I can't solve the problem, any help, please?

This is a sample code that produces the first slide:

% !TeX program = xelatex
\documentclass[xcolor=table]{beamer}
\usetheme{Madrid}
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Times New Roman}
\newfontfamily\arabicfontsf[Script=Arabic]{Times New Roman}

\makeatletter
\newcommand{\RTList}{\raggedleft\rightskip\@totalleftmargin}
\makeatother

 % RTL triangle for itemize
 \setbeamertemplate{itemize item}  
 {\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\bullet
$}} 

% re-definition of the title page
\setbeamertemplate{title page}{
\centering
\begin{beamercolorbox}[rounded=true,shadow=true,sep=8pt,center]{title}
\inserttitle \par \insertsubtitle \par
\end{beamercolorbox}
\vfill
\begin{beamercolorbox}[leftskip=8cm,center,wd=0.7\textwidth]{author}
\begin{columns}[T]
\begin{column}{.49\textwidth}%
\centering
\insertauthor
\end{column}
\begin{column}{.49\textwidth}%
\centering
\director
\end{column}
\end{columns}
\end{beamercolorbox}
\vfill
\usebeamerfont{institute}\insertinstitute \par
\vfill
\centering
\insertdate\par
\vfill
}

% to align the subsection in the toc to left
\setbeamertemplate{subsection in toc}[ball unnumbered]

\title[عنوان مختصر]{عنوان باللغة بالعربي}
\subtitle[عنوان مختصر]{
عنوان فرعي}
\author
{تقديم: \\ اسم القدم}
\newcommand{\director}{إشراف:\\ اسم المشرف}
\institute{اسم الجامعة}
\date{\today}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\end{document}

And this is the resulting slide:

enter image description here

And I would like the footline to be like the picture below but in arabic and from right to left: enter image description here

  • What would you use in RTL: 1/42 or 42/1 for the framenumber? – user36296 Jan 26 '18 at 18:17
  • I think it would be appropriate to write 42/1 – Ross Jan 26 '18 at 18:20
  • Good to know! I changed the order of the frame number, please see my updated answer. – user36296 Jan 26 '18 at 18:23
1
% !TeX program = xelatex
\documentclass[xcolor=table]{beamer}
\usetheme{Madrid}
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Times New Roman}
\newfontfamily\arabicfontsf[Script=Arabic]{Times New Roman}

\title[عنوان مختصر]{عنوان باللغة بالعربي}
\subtitle[عنوان مختصر]{عنوان فرعي}
\author{تقديم: \\ اسم القدم}
\institute{اسم الجامعة}
\date{\today}

\makeatletter
\setbeamertemplate{footline}
{%
  \leavevmode%
  \hbox{%
  \textenglish{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,left]{date in head/foot}%
    \usebeamerfont{date in head/foot}%
    \hspace*{2ex}\inserttotalframenumber{} / \insertframenumber{} \hspace*{2em}\textarabic{\insertshortdate}%
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\textarabic{\insertshorttitle}
  \end{beamercolorbox}%    
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}%
        (\textarabic{\insertshortinstitute})~~\textarabic{\insertshortauthor}%
  \end{beamercolorbox}%
  }}%
  \vskip0pt%
}
\makeatother

\begin{document}

\begin{frame}

\end{frame}

\begin{frame}

\end{frame}

\end{document}

enter image description here

  • This is the second time you help me thank you a lot but is there any way to make the date appear as the date in my first picture? – Ross Jan 26 '18 at 18:17
  • @AliMhrez You're welcome! Try with \textarabic{\insertshortdate} – user36296 Jan 26 '18 at 18:19
  • Of course, you will solve it I can't thank you enough. – Ross Jan 26 '18 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.