1

I am working on a presentation with beamer class in Persian and I have some problems with bilingual text. For writing left to right I use \LR command and it works, but the English is not aligned left. Especially in "itemize" environment it is very annoying. It seems that "latin" environment does not work in persian beamer. In addition the English numbers are shown in Persian. The sample code is as below:

\documentclass[t]{beamer}

\usepackage[persian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage{fontspec}

\setmainfont[Script=Arabic,Numbers=Arabic]{XB Zar} 
\setsansfont[Script=Arabic,Numbers=Arabic]{XB Zar} 

\begin{document}

\begin{frame}
یک متن پارسی \\
\LR{An english text with some numbers like 10, 11, 12, ...}
\end{frame}

\end{document}

enter image description here

  • I can’t compile your example: babel has no persian option. And you’re using fontspec, you shouldn’t be using inputenc and times. – Thérèse Jun 14 '16 at 21:46
  • Please excuse if I mix up things (I don't know anything about right-to-left languages), but maybe tex.stackexchange.com/questions/197575/… can help – user36296 Jun 14 '16 at 22:36
  • 2
    Some parts of your example suggest that you’re compiling your document with pdflatex (and then you probably need arabtex), while other parts suggest that you’re compiling with xelatex (and then you should look at xepersian and bidipresentation). Which do you want to use? – Thérèse Jun 19 '16 at 20:31
  • I have found some part of my question, but some part of it is still unanswered. I can write the English numbers in English by putting them between two $, but I still can not align the English text left. I think some part of the problem is rooted in "babel" package. If it was possible that the "Latin" environment work in Persian beamer, the problem would be solved. I am compiling the document with lualatex and it ends in error with xelatex. – Yousef Ahmadi Jun 27 '16 at 9:40
  • @YousefAhmadi Can you edit your question and include how far you have come? – user36296 Jun 29 '16 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.