I am writing a research paper in LaTeX. The paper is about Urdu Language Processing and i have to write Urdu words within English paragraphs. I have tried this:
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainfont{Times New Roman}
\newfontface{\urdu}[Script=Arabic]{Jameel Noori Nastaleeq}
#in the text, write Urdu like this:
In your document {\urdu اردو ایسے لکھیں} write Urdu like this.
But it doesnot work for me. I need help for this.
While writing in multiple languages under polyglossia
you have to specify them (see this for a detailed answer on how to write Urdu - English mixed documents in Latex).
Here is a MWE.
documentclass[12pt]{article}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainlanguage{english}
\setotherlanguage{urdu}
\setmainfont[Path=/Users/ghalib/Library/Fonts/]{ufonts.com_jameel-noori-nastaleeq.ttf}
\begin{document}
In your document \texturdu{ اردو ایسے لکھیں} write Urdu like this.
\vspace{0.5in}
\noindent
\begin{center}
\texturdu{
اردو ہے جس کا نام ، ہمیں جانتے ہیں داغ \\
سارے جہاں میں دھوم ہماری زباں کی ہے\\
\hspace{6cm} (داغ دھلوی)
}
\end{center}
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With