Skip to main content
replaced http://tex.stackexchange.com/ with https://tex.stackexchange.com/
Source Link

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 herequestion 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

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

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

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 loke tolook 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

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 loke to 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

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

Source Link
Salim Bou
  • 17.6k
  • 2
  • 34
  • 86

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 loke to 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