我有一个 LaTeX 文档,使用xepersian
:
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{xepersian}
\listfiles
\title{نمونه مقاله}
\author{نویسنده}
\begin{document}
\maketitle
\tableofcontents
\begin{abstract}
این یک نوشته آزمایشی است.
\end{abstract}
\section{}
\end{document}
当我想从中导出 pdf 时,出现错误:
Undefined control sequence
在xepersian.sty
文件中的以下行:\PersianAlphs
我的日志中也得到了这个*文件列表:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
xepersian.sty 2015/02/02 v16 Persian typesetting in XeLaTeX
fontspec.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
expl3.sty 2014/01/07 v4646 L3 Experimental code bundle wrapper
l3names.sty 2014/01/04 v4640 L3 Namespace for primitives
l3bootstrap.sty 2014/01/04 v4640 L3 Experimental bootstrap code
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty 2014/01/04 v4642 L3 Basic definitions
l3expan.sty 2014/01/04 v4642 L3 Argument expansion
l3tl.sty 2013/12/27 v4625 L3 Token lists
l3seq.sty 2013/12/14 v4623 L3 Sequences and stacks
l3int.sty 2013/08/02 v4583 L3 Integers
l3quark.sty 2013/12/14 v4623 L3 Quarks
l3prg.sty 2014/01/04 v4642 L3 Control structures
l3clist.sty 2013/07/28 v4581 L3 Comma separated lists
l3token.sty 2013/08/25 v4587 L3 Experimental token manipulation
l3prop.sty 2013/12/14 v4623 L3 Property lists
l3msg.sty 2013/07/28 v4581 L3 Messages
l3file.sty 2013/10/13 v4596 L3 File and I/O operations
l3skip.sty 2013/07/28 v4581 L3 Dimensions and skips
l3keys.sty 2013/12/08 v4614 L3 Experimental key-value interfaces
l3fp.sty 2014/01/04 v4642 L3 Floating points
l3box.sty 2013/07/28 v4581 L3 Experimental boxes
l3coffins.sty 2013/12/14 v4624 L3 Coffin code layer
l3color.sty 2012/08/29 v4156 L3 Experimental color support
l3luatex.sty 2013/07/28 v4581 L3 Experimental LuaTeX-specific functions
l3candidates.sty 2014/01/06 v4643 L3 Experimental additions to l3kernel
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
xparse.sty 2013/12/31 v4634 L3 Experimental document command parser
fontspec-patches.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
fixltx2e.sty 2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty 2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX
fontenc.sty
eu1enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
eu1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty 2011/09/09 v0.981 provides access to latin accents and many other characters in Unicode lower plane
eu1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
xetex.def 2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)
fontspec.cfg
xepersian-persiancal.sty 2012/07/25 v0.2 provides Persian calendar
xepersian-mathsdigitspec.sty 2014/11/21 v1.1.0 Unicode Persian maths digits in XeLaTeX
bidi.sty 2015/02/17 v16.9 Bidirectional typesetting in plain TeX and LaTeX
iftex.sty 2013/04/04 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX, and LuaTeX
biditools.sty 2015/02/16 v0.4 Programming tools for bidi package
zref-abspage.sty 2012/04/04 v2.24 Module abspage for zref (HO)
zref-base.sty 2012/04/04 v2.24 Module base for zref (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
auxhook.sty 2011/03/04 v1.3 Hooks for auxiliary files (HO)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
xkeyval.sty 2012/10/14 v2.6b package option processing (HA)
xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
latex-xetex-bidi.def 2015/02/01 v1.1.9 bidi adaptations for `latex.ltx' for XeTeX engine
footnote-xetex-bidi.def 2013/04/26 v0.8 bidi footnote macros for XeTeX engine
article-xetex-bidi.def 2010/07/25 v0.4 bidi adaptations for standard article class for XeTeX engine
graphicx-xetex-bidi.def 2012/01/01 v0.4 bidi adaptations for graphicx package for XeTeX engine
loadingorder-xetex-bidi.def 2013/05/22 v0.95 making sure that bidi is the last package loaded
loadingorder-xepersian.def 2012/01/01 v0.3 making sure that xepersian is the last package loaded
fontspec-xetex-xepersian.def 2014/07/10 v0.1 fixes for fontspec-xetex package
footnote-xepersian.def 2013/04/26 v0.4 footnote macros for xepersian package
article-xepersian.def 2010/07/25 v0.2 adaptations for standard article class
t3cmr.fd 2001/12/31 TIPA font definitions
***********
答案1
那是因为您没有设置波斯语文本字体。
\usepackage{xepersian}
\settextfont{FreeFarsi}% http://sourceforge.net/projects/fpf/
%\setlatintextfont{Liberation Serif}