tayyaba
tayyaba

Reputation: 93

How to write Urdu language in LaTEX?

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.

Upvotes: 8

Views: 4216

Answers (1)

R.U.
R.U.

Reputation: 353

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}

enter image description here

Upvotes: 10

Related Questions