[Tex/LaTex] Inserting some Arabic script in an English article

arabicbidilanguagespersianxetex

Until now I was using XePersian package to typeset Persian articles, now I want insert some Persian word in an English document, what is minimum code to do that without using XePersian package?

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Tahoma}


\begin{document}
book
کتاب
% rendered as ک ت ا ب but should be rendered کتاب

\end{document}

Best Answer

Very simple. I do it like this:

\usepackage{bidi}% this should be the last package to load.
\newfontfamily\Kayhan[Script=Arabic]{XB Kayhan}% for example
\newenvironment{Farsi}%more human readable - other stuff can be added as well
{\begin{RTL}}
{\end{RTL}}

Then just write farsi like this:

This is an english paragraph with some 
\begin{Farsi}\Kayhan
نوشته فارسی
\end{Farsi}
that is added.