I tried to create slides with beamer and the babel package with Farsi option \usepackage[farsi]{babel}. When I run it, I have some errors.

I use this code:

% ‎Or whatever‎. ‎Note that the encoding and the font should match‎. ‎If T1‎
% ‎does not look nice‎, ‎try deleting the line with the fontenc‎.
‎\setbeamertemplate{navigation symbols}{}‎

% ‎Standard packages‎

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

‎\tikzstyle{block}=[draw opacity=0.7,line width=1.4cm]‎
% ‎colored hyperlinks‎

% ‎the titlepage‎
‎%\begin{frame}[plain,noframenumbering] % the plain option removes the sidebar and header from the title page‎
  • Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}) or hit Ctrl+K. – Claudio Fiandrino Jan 5 '14 at 8:25
  • What error do you exactly get and how do you compile the code? My guess is you either are missing Aalborg theme, or compiling it with the wrong command. But first you should provide some more details about your problem. – Pouya Jan 5 '14 at 12:33

Here is code that works in XeLaTeX, may be able to get you running. Add your tweaks (packages, preferences, etc) to it VERY carefully, line by line, compiling each time to check if you've introduced errors. Remember, all Persian text must live inside {\F } (which means my solution may not be ideal). If you do not have "Geeza Pro" on your system, use the title of another Farsi typeface.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode







\newfontfamily{\F}{Geeza Pro} % Farsi


Persian: {\F سلام}


The code seems to mix lines which are non-XeLaTeX-ish with ones that are:

  • You use \usepackage{helvet} and old fashioned encoding definition. Try using Helvetica through font definition in fontspec. You might want to switch to a free / open-source font as well…
  • You use babel instead of polyglossia.

I don't know what error messages you get. I hope this will help you in solving this problem, which is unfortunately not well-defined as worded.

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.