0

Consider the MWE below:

MWE

\documentclass{beamer-rl}
\babelprovide[import=ar, main,mapdigits]{arabic}

\usepackage{enumitem}

\usetheme{CambridgeUS}

\title{مثال تجريبي}
\subtitle{نموذج}
\begin{document}

\section{اليوم الاول}
\subsection{مقدمة}

\begin{frame}
  \frametitle{لمحة تاريخية}
  \begin{enumerate}[label*=\arabic*.]
  \item الجملة الاولى
  \item الجملة الثانية
    \begin{enumerate}
    \item[ا.] تفرع اول
    \item[ب.] تفرع ثاني
    \item[جـ.] تفرع ثالث
    \end{enumerate}
  \item الجملة الثانية
  \end{enumerate}
\end{frame}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-engine: luatex
%%% TeX-master: t
%%% End:

Output enter image description here

Question

I need to get the same output in Beamer without entering the sub-items manually (ا، ب، ج، د) these are the Hindi eastern Arabic letters, how to achieve that by having enumitem package generate that automatically just as the numbers, i.e. I don't want to put the letters by myself each time I have subitems list especially when the list is actually a long one. How to do that?

Note

tex engine is luatex

1 Answer 1

2

If things haven't changed, enumitem is not compatible with beamer. But the latter provides tools to configure lists. (Well, the 3rd item has a tatweel, while the default abjad doesn't, so I've added to \babelprovide an option to redefine it.)

\documentclass{beamer-rl}
\babelprovide[import, main,
 mapdigits,
 counters/abjad = ا ب جـ د ه‍ و
 ]{arabic}

\usetheme{CambridgeUS}
\setbeamertemplate{enumerate item}{\arabic{enumi}.}
\setbeamertemplate{enumerate subitem}{\localecounter{abjad}{enumii}.}

\title{مثال تجريبي}
\subtitle{نموذج}

\begin{document}

\section{اليوم الاول}
\subsection{مقدمة}

\begin{frame}
  \frametitle{لمحة تاريخية}
  \begin{enumerate}
  \item الجملة الاولى
  \item الجملة الثانية
    \begin{enumerate}
    \item تفرع اول
    \item تفرع ثاني
    \item تفرع ثالث
    \end{enumerate}
  \item الجملة الثانية
  \end{enumerate}
\end{frame}

\end{document}

enter image description here

5
  • Thanks, the MWE works fine, but when I try to implement it on my actual beamer if throws an error: ERROR: TeX capacity exceeded, sorry [input stack size=5000]. --- TeX said --- \labelenumi ->{\labelenumi } l.230 \item ا...
    – doctorate
    Jun 4, 2021 at 8:02
  • strange enough that beamer won't complain if I provide the [labe=\...] argument after \begin{enumerate} i.e. like this \begin{enumerate}[label=\...]
    – doctorate
    Jun 4, 2021 at 8:05
  • Aha, I didn't notice that you removed \usepackage{enumitem} altogether from the preamble, sorry my... so now it works fine without loading this package.
    – doctorate
    Jun 4, 2021 at 8:15
  • I wonder now without loading this package, how to change the color of the font of the items, I mean how to pass it as an argument per list using enumerate?
    – doctorate
    Jun 4, 2021 at 8:19
  • I am using now \setbeamertemplate{enumerate item}{\textcolor{orange}{\arabic{enumi}.}} from preamble, but I am asking about a local way to change color.
    – doctorate
    Jun 4, 2021 at 9:40

You must log in to answer this question.

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