# Inserting some Arabic script in an English article

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}

-
 You should try the Polyglossia package. – Andrey Vihrov Jan 5 at 10:54 @AndreyVihrov Thanks, can you please give me a minimum example? – PHPst Jan 18 at 20:22

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
{\begin{RTL}}
{\end{RTL}}


Then just write farsi like this:

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

-
\documentclass{article}
\usepackage{fontspec}
\newfontfamily\faFont[Script=Arabic]{Yas}
\usepackage{bidi}
\newenvironment{Fa}{\begin{RTL}\faFont}{\end{RTL}}
\newcommand{\fa}[1]{{\faFont\RL{#1}}}

\begin{document}
\begin{Fa}
پاراگراف فارسی
\end{Fa}
This is a Persian word: \fa{سیب}. It means apple.
\end{document}


Use fa for word level and Fa for paragraph level of Persian contents.

-