# itemize inside the block in beamer ARABIC RTL Polyglossia

I want to create a presentation to be able to put itemize inside the block in beamer.

    \documentclass[10pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}

\usepackage{polyglossia}
\setdefaultlanguage[numerals=maghrib,locale=algeria]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic]{Amiri}

\usetheme{Warsaw}
\rightskip\rightmargin

\title{بسم الله الرحمان الرحيم \\
\textcolor{yellow}{محسن}}

\author{\textenglish{Mohcine}}
\institute{فئة المستهدفة}
\date{\today}

\begin{document}

\begin{frame}
\maketitle
\end{frame}

\begin{frame}{Title Frame}
\frametitle{تمارين رقم 1}
\begin{block}{تمارين رقم 1}
{
أدرس قابلية اشتقاق الدالة في النقطة  في كل حالة مما يلي ثم اكتب معادلة المماس في هذه النقطة:
\begin{itemize}
\item $f(x)=5x-3$ و $x_{0}=2$
\item $f(x)=3x^2-2x+5$ و $x_{0}=0$
\item $f(x)=\sin x$ و $x_{0}=\dfrac{\pi}{2}$
\item $f(x)=\cos 2x$ و $x_{0}=\dfrac{\pi}{3}$
\item $f(x)=\tan x$ و $x_{0}=0$
\item $f(x)=-\dfrac{1}{2}x^{3}+x^{2}$ و $x_{0}=2$
\item $f(x)=-\dfrac{x+1}{x+2}$ و $x_{0}=1$
\end{itemize}
}
\end{block}
\end{frame}

\end{document}


which produces the following image

• Writing beamer presentation for RTL languages (xelatex engine) still facing some issues best to use lualatex with beamer-rl class tex.stackexchange.com/a/511186/54817 Commented Mar 26, 2020 at 17:21

## 1 Answer

In a way

\begin{itemize}\itemindent=1.75em
\item $f(x)=5x-3$ و $x_{0}=2$
...
\end{itemize}


OR def bitemize environment for block itemize.

%+++++++++++++++++ def block itemize
\makeatletter
\newenvironment{bitemize}{%
\ifnum\@itemdepth >2\relax\@toodeep\else%
\advance\@itemdepth\@ne%
\beamer@computepref\@itemdepth%
\usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
\usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
\begin{list}
{%
\usebeamertemplate{itemize \beameritemnestingprefix item}%
}%
{ \itemindent=1.75em%
\def\makelabel##1{%
{%
\hss\llap{{%
\usebeamerfont*{itemize \beameritemnestingprefix item}%
\usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%
}%
}%
}
\raggedright
\fi
}
{
\end{list}
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body end}%
}
\expandafter\let\csname beamer@@tmpop@itemize item@default\endcsname\relax
\expandafter\let\csname beamer@@tmpop@itemize subitem@default\endcsname\relax
\expandafter\let\csname beamer@@tmpop@itemize subsubitem@default\endcsname\relax
\makeatother
%+++++++++++++++++


The editing of your code is as follows.

\documentclass[10pt,a4paper]{beamer}
\usepackage[utf8]{inputenc}

\usepackage{polyglossia}
\setdefaultlanguage[numerals=maghrib,locale=algeria]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic]{Amiri}

\usetheme{Warsaw}
\rightskip\rightmargin

\title{بسم الله الرحمان الرحيم \\
\textcolor{yellow}{محسن}}

\author{\textenglish{Mohcine}}
\institute{فئة المستهدفة}
\date{\today}

%+++++++++++++++++ def block itemize
\makeatletter
\newenvironment{bitemize}{%
\ifnum\@itemdepth >2\relax\@toodeep\else%
\advance\@itemdepth\@ne%
\beamer@computepref\@itemdepth%
\usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
\usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
\begin{list}
{%
\usebeamertemplate{itemize \beameritemnestingprefix item}%
}%
{ \itemindent=1.75em%
\def\makelabel##1{%
{%
\hss\llap{{%
\usebeamerfont*{itemize \beameritemnestingprefix item}%
\usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%
}%
}%
}
\raggedright
\fi
}
{
\end{list}
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body end}%
}
\expandafter\let\csname beamer@@tmpop@itemize item@default\endcsname\relax
\expandafter\let\csname beamer@@tmpop@itemize subitem@default\endcsname\relax
\expandafter\let\csname beamer@@tmpop@itemize subsubitem@default\endcsname\relax
\makeatother
%+++++++++++++++++

\begin{document}

\begin{frame}
\maketitle
\end{frame}

\begin{frame}
\frametitle{تمارين رقم 1}
\begin{block}{تمارين رقم 1}
أدرس قابلية اشتقاق الدالة في النقطة  في كل حالة مما يلي ثم اكتب معادلة المماس في هذه النقطة:
\begin{itemize}\itemindent=1.75em
\item $f(x)=5x-3$ و $x_{0}=2$
\item $f(x)=3x^2-2x+5$ و $x_{0}=0$
\item $f(x)=\sin x$ و $x_{0}=\dfrac{\pi}{2}$
\item $f(x)=\cos 2x$ و $x_{0}=\dfrac{\pi}{3}$
\item $f(x)=\tan x$ و $x_{0}=0$
\item $f(x)=-\dfrac{1}{2}x^{3}+x^{2}$ و $x_{0}=2$
\item $f(x)=-\dfrac{x+1}{x+2}$ و $x_{0}=1$
\end{itemize}
\end{block}
\end{frame}

\begin{frame}
\frametitle{تمارين رقم 2}
\begin{block}{تمارين رقم 2}
أدرس قابلية اشتقاق الدالة في النقطة  في كل حالة مما يلي ثم اكتب معادلة المماس في هذه النقطة:
\begin{bitemize}
\item $f(x)=5x-3$ و $x_{0}=2$
\item $f(x)=3x^2-2x+5$ و $x_{0}=0$
\item $f(x)=\sin x$ و $x_{0}=\dfrac{\pi}{2}$
\item $f(x)=\cos 2x$ و $x_{0}=\dfrac{\pi}{3}$
\item $f(x)=\tan x$ و $x_{0}=0$
\item $f(x)=-\dfrac{1}{2}x^{3}+x^{2}$ و $x_{0}=2$
\item $f(x)=-\dfrac{x+1}{x+2}$ و $x_{0}=1$
\end{bitemize}
\end{block}
\end{frame}

\end{document}


output with TexLive 2019:

• Please, How can I add symbole like number instead of bullet to bitemize
– Educ
Commented Apr 3, 2020 at 20:20
• can we flush left the itemize list from left to right??? Commented Aug 21, 2021 at 16:43