1

First of all, arabic numbers are 1, 2, 3, and so on, but with arabic eastern numbers I mean ١, ٢, ٣, ٤, ٥ and so on.

In the below MWE I get section numbers in Arabic. I want them to be written in eastern Arabic format like above, could you please help me out?

MWE

\documentclass[12pt]{beamer}
\usepackage{polyglossia}
\setmainlanguage[numerals=mashriq,abjadjimnotail=true]{arabic} % Polyglossia package for more options
\setotherlanguages{english}
\newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Amiri}
\setsansfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Simplified Arabic} % Bold sans used for sections
\newfontfamily\englishfont{Arial}
\setbeamertemplate{frametitle}[default][right]
\usetheme{Frankfurt}
\title{مثال تجريبي للمشكلة}

\AtBeginSection[] % Do nothing for \section*
{   %
  \
  \begin{minipage}{1.0\linewidth}
  \begin{frame}
    \frametitle[TOC]{المحتويات}
    \tableofcontents[currentsection,currentsubsection,subsubsectionstyle=hide/hide]
  \end{frame}    
  \end{minipage}
}
\setbeamertemplate{items}[square]

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

\section*{المحتويات}
\begin{minipage}{1.0\linewidth}
  \frame{\tableofcontents[subsubsectionstyle=hide/hide]} %this is the first slide of TOC
\end{minipage}

\section{مقدمة}
\begin{frame}[c]
  \frametitle{عندما تكتب قائمة من النقاط}
  \begin{itemize}
  \item هنا النقطة الاولى
  \item الثانية حيث اكتب ١، ٢، ٣، ٤، ٥
  \item الثالثة
  \end{itemize}
\end{frame}
\section{الفصل الاول}

\section{الفصل الثاني --- تفاصيل عن الموضوع}

\section{الفصل الثالث}

\end{document}

Output

enter image description here

0

1 Answer 1

1

You can use \arabicnumber provided from polyglossia to obtain eastern form of numbers, the command will be applied on \inserttocsectionnumber.

\addtobeamertemplate{section in toc}{%
\let\temp\inserttocsectionnumber
\def\inserttocsectionnumber{\arabicnumber\temp}}{}

Complete code

\documentclass[12pt]{beamer}
\usepackage{polyglossia}
\setmainlanguage[numerals=mashriq,abjadjimnotail=true]{arabic} % Polyglossia package for more options
\setotherlanguages{english}
\newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Amiri}
\setsansfont[Script=Arabic,Mapping=arabicdigits,Ligatures=TeX]{Simplified Arabic} % Bold sans used for sections
\newfontfamily\englishfont{Arial}
\setbeamertemplate{frametitle}[default][right]
\usetheme{Frankfurt}
\title{مثال تجريبي للمشكلة}




\AtBeginSection[] % Do nothing for \section*
{   %
  \
  \begin{minipage}{1.0\linewidth}
  \begin{frame}
    \frametitle[TOC]{المحتويات}
    \tableofcontents[currentsection,currentsubsection,subsubsectionstyle=hide/hide]
  \end{frame}    
  \end{minipage}
}
\setbeamertemplate{items}[square]



\addtobeamertemplate{section in toc}{%
\let\temp\inserttocsectionnumber
\def\inserttocsectionnumber{\arabicnumber\temp}}{}



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

\section*{المحتويات}
\begin{minipage}{1.0\linewidth}
  \frame{\tableofcontents[subsubsectionstyle=hide/hide]} %this is the first slide of TOC
\end{minipage}

\section{مقدمة}
\begin{frame}[c]
  \frametitle{عندما تكتب قائمة من النقاط}
  \begin{itemize}
  \item هنا النقطة الاولى
  \item الثانية حيث اكتب ١، ٢، ٣، ٤، ٥
  \item الثالثة
  \end{itemize}
\end{frame}
\section{الفصل الاول}

\section{الفصل الثاني --- تفاصيل عن الموضوع}

\section{الفصل الثالث}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .