我正在使用xepersian
一个主要的软件包来撰写我的阿拉伯语论文,我遇到了包含 LTR 和 RTL 参考文献的参考书目问题,如果可能的话,polyglossia
我想将阿拉伯数字作为主要编号。xepersian
这是我的 MWE:
\documentclass[a4paper]{book}
\usepackage{color}
\usepackage[linktocpage=true,colorlinks,citecolor=blue,pagebackref=true]{hyperref}%
\usepackage[nonamebreak]{natbib}
\usepackage[top=30mm, bottom=30mm, left=30mm, right=30mm]{geometry}
\usepackage{xepersian}
\settextfont[Scale=1 ]{XB Zar}%Ligatures=TeX, Mapping={} are useless in this case
%
\begin{document}
\chapter{\lr{chapter one}}
\section{\lr{section one}}
\subsection{\lr{subsection one}}
\end{document}
这是代码更新
\begin{filecontents}{SomeReferences.bib}
@article{Baker02limits,
author = {Baker,, Simon and Kanade,, Takeo},
title = {Limits on Super-Resolution and How to Break Them},
journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
volume = {24},
number = {9},
year = {2002},
issn = {0162-8828},
pages = {1167--1183},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA}
}
@CONFERENCE{Amintoosi87afzayesh,
AUTHOR = {امینطوسی,محمود and مزینی,ناصر and فتحی,محمود},
TITLE = {افزایش وضوح ناحیهای},
BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
YEAR = {1387},
ORGANIZATION = {دانشگاه امیرکبیر},
ADDRESS = {تهران ایران},
month = {اسفند},
pages = {101--108},
LANGUAGE = {Persian}
}
\end{filecontents}
\documentclass[a4paper]{article}
\usepackage{color}
\usepackage[linktocpage=true,colorlinks,citecolor=blue,pagebackref=true]{hyperref}%
\usepackage[nonamebreak]{natbib}
\usepackage[top=30mm, bottom=30mm, left=30mm, right=30mm]{geometry}
\usepackage{xepersian}
\settextfont[Scale=1, Ligatures=TeX]{XB Zar}
\begin{document}
\Latincite{Baker02limits}\\
\citep{Amintoosi87afzayesh}\\
\bibliographystyle{asa-fa}
\bibliography{SomeReferences}
\end{document}
Ps:完整的示例可以从此链接下载:.zip 文件还包含 .bst 文件
答案1
通过使用您提到的Ligatures=TeX, Mapping={}
as\settextfont
选项,我的电脑上没有出现任何问题。也许您的xepersian
软件包已经过时了。
\documentclass[a4paper]{book}
\usepackage{xepersian}
\settextfont[Scale=1, Ligatures=TeX, Mapping={}]{XB Zar}
\begin{document}
\chapter{\lr{chapter one}}
\section{\lr{section one}}
\subsection{\lr{subsection one}}
\end{document}
附言
xepersian
1-和的最新版本分别bidi
为2017/12/24 v19.8
和2017/12/05 v31.7
。2-
包xepersian
依赖于bidi
。
新版本(也是正确的版本)。
以下解决方案受到xepersian
为文本制作波斯数字地图的解决方案的启发。
\begin{filecontents*}{mydigits.map}
LHSName "MyDigits"
RHSName "ArabicDigits"
pass(Unicode)
U+002C <> U+060C ; comma > arabic comma
U+003F <> U+061F ; question mark -> arabic qm
U+003B <> U+061B ; semicolon -> arabic semicolon
; ligatures from Knuth's original CMR fonts
U+002D U+002D <> U+2013 ; -- -> en dash
U+002D U+002D U+002D <> U+2014 ; --- -> em dash
U+0027 <> U+2019 ; ' -> right single quote
U+0027 U+0027 <> U+201D ; '' -> right double quote
U+0022 > U+201D ; " -> right double quote
U+0060 <> U+2018 ; ` -> left single quote
U+0060 U+0060 <> U+201C ; `` -> left double quote
U+0021 U+0060 <> U+00A1 ; !` -> inverted exclam
U+003F U+0060 <> U+00BF ; ?` -> inverted question
; additions supported in T1 encoding
U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK
U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET
U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET
;;
;; End of file `mydigits.map'.
\end{filecontents*}
\immediate\write18{teckit_compile mydigits.map -o mydigits.tec}
\begin{filecontents}{SomeReferences.bib}
@article{Baker02limits,
author = {Baker,, Simon and Kanade,, Takeo},
title = {Limits on Super-Resolution and How to Break Them},
journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
volume = {24},
number = {9},
year = {2002},
issn = {0162-8828},
pages = {1167--1183},
publisher = {IEEE Computer Society},
address = {Washington, DC, USA}
}
@CONFERENCE{Amintoosi87afzayesh,
AUTHOR = {امینطوسی,محمود and مزینی,ناصر and فتحی,محمود},
TITLE = {افزایش وضوح ناحیهای},
BOOKTITLE = {چهاردهمین کنفرانس ملی سالانه انجمن کامپیوتر ایران},
YEAR = {1387},
ORGANIZATION = {دانشگاه امیرکبیر},
ADDRESS = {تهران ایران},
month = {اسفند},
pages = {101--108},
LANGUAGE = {Persian}
}
\end{filecontents}
\documentclass[a4paper]{article}
\usepackage{color}
\usepackage[linktocpage=true,colorlinks,citecolor=blue,pagebackref=true]{hyperref}%
\usepackage[nonamebreak]{natbib}
\usepackage[top=30mm, bottom=30mm, left=30mm, right=30mm]{geometry}
\usepackage[]{xepersian}
\settextfont[Scale=1, Mapping=mydigits,]{XB Zar}
\begin{document}
\Latincite{Baker02limits}\\
\citep{Amintoosi87afzayesh}\\
\bibliographystyle{asa-fa}
\bibliography{SomeReferences}
\end{document}
正如您所注意到的,您可以创建一个名为的文件mydigits.map
,然后必须使用以下命令对其进行编译:
teckit_compile mydigits.map -o mydigits.tec
因此,您可以照常使用字体,只是必须进行设置Mapping
才能mydigits
进行所需的适应。