在 WinEdt 中输入乌尔都语(使用 Miktex)

在 WinEdt 中输入乌尔都语(使用 Miktex)

这听起来可能是一个重复的问题,但我对 TeX 系统确实很陌生。我经历了以下步骤:

  • 已安装 MiKTeX 2.9
  • 已安装 WinEdt 9.0
  • WinEdt 自动拾取了 Miktex,我能够打开示例 TeX 文件
  • 更新 MiKTeX 以下载polyglossia软件包

现在我想在文档中使用乌尔都语。我使用了以下示例

%! xelatex mal-urdu.tex
% To download: http://scripts.sil.org/cms/scripts/page.php?item_id=Scheherazade#1fd0063a
\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{xltxtra}
\usepackage{fontspec}
 \usepackage{polyglossia}
 \setmainlanguage{english}
 \setotherlanguage{urdu}
  \newfontfamily\urdufont[Script=Arabic,Language=Urdu,Scale=1.5]{Amiri} % or   
  Scheherazade after installing the font
   \begin{document}
    Text before. \texturdu{ وہ کتاب ہے۔ میں جا رہا ہوں} Text after.
    \end{document}

当我编译此文件时,出现以下错误

* XeTeX is required to compile this document 
* Sorry

选择 xelatex 后,我收到以下错误日志

Running hbf2gf.exe...
hbf2gf (CJK ver. 4.8.3)
Couldn't find `I.cfg'
miktex-maketfm: No creation rule for font ICU.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
! 
! The font "Amiri" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

 l.10 ...ipt=Arabic,Language=Urdu,Scale=1.5]{Amiri}
                                    % or Scheherazade after i...Running miktex-         
makemf.exe...
mik   tex-makemf: The ICU source file could not be found.

Running hbf2gf.exe...


hbf2gf (CJK ver. 4.8.3)
 Couldn't find `I.cfg'

miktex-maketfm: No creation rule for font ICU.
*************************************************
* fontspec warning: "script-not-exist"
* 
* Font 'Amiri' does not contain script 'Arabic'.
*************************************************
! Cannot use \XeTeXOTcountlanguages with nullfont; not an OpenType Layout font.
<argument> ...eXOTcountlanguages \l_fontspec_font 
                                              \l_fontspec_script_int 
l.10 ...ipt=Arabic,Language=Urdu,Scale=1.5]{Amiri}
% or Scheherazade after i...? 
Process has been terminated ...

我不知道如何解决这个问题。

答案1

在工具栏中,有一个下拉菜单让你选择默认编译器:默认是pdflatex 在此处输入图片描述

并点击右侧的小黑三角形,您可以选择 XeLaTeX,获得此默认值:

在此处输入图片描述

相关内容