2

I am using xepersian with beamer and I have a problem with list environments, e.g. itemize and enumerate. I cannot flush them to the right (make them right-aligned). As you can see in the MWE, I have tried setRL, setRTL and flushright, but they have no effect on the slides.

\documentclass{beamer}
\usepackage{beamerthemesplit}
\usepackage{xepersian}
\settextfont{FreeFarsi}% http://sourceforge.net/projects/fpf/

\begin{document}
\begin{persian}

\begin{frame}{مشکل لیست}
  \begin{flushright}
  متن نمونه
  \end{flushright}

  \setRL
  {
    \begin{itemize}
      \item مورد اول
    \end{itemize}
  }

  \begin{flushright}
    \begin{enumerate}
      \item مورد اول
    \end{enumerate}
  \end{flushright}

\end{frame}

\end{persian}
\end{document}

P.S. It is probably pushing it, but can I do something so the triangle in itemize points to the left?

4

There are multi problems in the alignment of texts when using RTL languages in beamer with xelatex, not currently have a comprehensive solution.

In my case, I use some tricks and I suspect it work for you:

  1. To right align main text in the frames you can use \everypar{\rightskip\rightmargin}
  2. To right align lists after the beginning of the list environment put \raggedleft, you can add a command \RTlist to control item right margin.
  3. For triangle of bullet points to the left, you can take a look at my question here and the detailed answer from @GonzaloMedina.

And here your MWE with those changes

\documentclass{beamer}
\usepackage{beamerthemesplit}
\usepackage{xepersian}
\settextfont{FreeFarsi}% http://sourceforge.net/projects/fpf/

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

\setbeamertemplate{itemize item}{\scriptsize\raise1.25pt%
 \hbox{\donotcoloroutermaths$\blacktriangleleft$}} 

\setbeamertemplate{enumerate items}[ball] % or circle 

\begin{document}
\begin{persian}
\everypar{\rightskip\rightmargin}

\begin{frame}{مشکل لیست}
  متن نمونه

 \begin{itemize}\RTList
      \item مورد اول
 \end{itemize}


 \begin{enumerate}\RTList
      \item مورد اول
      \begin{enumerate}\RTList
      \item  مورد اول
      \item  مورد ثان
      \end{enumerate}
 \end{enumerate}


\end{frame}

\end{persian}
\end{document}

enter image description here

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.