如何在LaTEX中写乌尔都语?

tay*_*aba 4 latex

我正在LaTeX中写一篇研究论文。这篇文章是关于乌尔都语语言处理的,我必须在英文段落中写乌尔都语单词。我已经试过了:

\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.
Run Code Online (Sandbox Code Playgroud)

但这对我不起作用。我需要帮助。

R.U*_*.U. 5

在使用多种语言编写时,polyglossia您必须指定它们(有关如何编写Urdu-Latex中英语混合文档的详细答案,请参见此内容)。这是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}
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明