带有 Polyglossia 和 Xepersian 包的 Persian-bib

带有 Polyglossia 和 Xepersian 包的 Persian-bib

我正在使用 Polyglossia 软件包在 Latex 中撰写我的论文,其中阿拉伯语是主要语言,我对阿拉伯语引文和参考文献中的倒逗号有问题,显示这个(,),但它应该是这个(،)这是我的 MWE:

    \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}%nonamebreak,numbers,
\usepackage[top=30mm, bottom=30mm, left=30mm, right=30mm]{geometry}
%%
\usepackage[utf8]{inputenc}
\usepackage{polyglossia}
\usepackage[T1]{fontenc}
\setotherlanguage{english}
\setotherlanguage{persian}
\newfontfamily\englishfont{Amiri}[Scale=1.5]%
\setotherlanguage{french}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\setmainlanguage[calendar=gregorian, numerals=maghrib, locale=morocco, abjadjimnotail=false]{arabic}
%
\usepackage{xepersian}
\settextfont[Scale=1]{XB Zar}
%
\begin{document}
%
\Latincite{Baker02limits}\\
\citep{Amintoosi87afzayesh}\\
%     
 \bibliographystyle{asa-fa}
 \bibliography{SomeReferences}

\end{document}

在此处输入图片描述

答案1

您的主要语言是arabic,因此它与 不匹配persian bibtex。您应该为其添加define一种新persian字体,如下所示:

\defpersianfont\mfo[Scale=1.1]{Amiri}

而且您还必须refname使用polyglossia以下结构重新定义:

\addto\captionsarabic{
    \renewcommand{\refname}{\mfo المراجع}
}

现在你必须使用以下结构来bibliography

{\mfo 
\bibliographystyle{asa-fa}
\bibliography{SomeReferences.bib}}

然后你必须使用set up与下面相同的编辑器(texstudio):


Option->Cofigure TeXtstudio 在此处输入图片描述

step 4必须使用以下代码:

txs:///xelatex |bibtex8 -W -c cp1256fa %.aux| txs:///xelatex|txs:///xelatex

xelatex并使用引擎和用户进行编译,xexebibxe如下所示:


在此处输入图片描述

这是你的代码:


\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[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{polyglossia}
\setotherlanguage{english}
\setotherlanguage{persian}
\newfontfamily\englishfont{Amiri}[Scale=1.5]%
\setotherlanguage{french}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\setmainlanguage[calendar=gregorian, numerals=maghrib, locale=morocco, abjadjimnotail=false]{arabic}
\usepackage{xepersian}
\settextfont[Scale=1]{XB Zar}
\defpersianfont\mfo[Scale=1.1]{Amiri}
\addto\captionsarabic{%
\renewcommand{\refname}{\mfo المراجع}
}
\begin{document}
\noindent
\Latincite{Baker02limits}\\
{\mfo 
\citep{Amintoosi87afzayesh}}\\

{\mfo 
\bibliographystyle{asa-fa}
\bibliography{SomeReferences.bib}}
\end{document}

这将是你的输出:


在此处输入图片描述

祝你好运。

相关内容