1

I'am writing my thesis in Latex with Polyglossia package where Arabic is the main language, I have a problem with the inverted comma in Arabic citations nad references, shows this (,) but it should be this (،) here is my 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}

enter image description here

0

1 Answer 1

1

Your main language is arabic, so it does not match with persian bibtex. you should define a new persian font for it same as below:

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

And also you have to redefine refname with polyglossia structure as below:

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

Now you have to use the following structure for bibliography

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

Then you have to set up your editor (texstudio) as the same as below:


Option->Cofigure TeXtstudio enter image description here

In step 4 you have to use this code:

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

And compile it with xelatex engine and xexebibxe user same as below:


enter image description here

This is your codes:


\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}

This will be your output:


enter image description here

Good luck.

3
  • Your solution seems to be well explained and clear, on the output screen shot, do you see that English comma in the Persian citation? Commented Oct 16, 2018 at 8:28
  • 1
    @Abdelhak Elfengour Only in one case the comma is in English. I edited. please see new edit. Commented Oct 16, 2018 at 20:21
  • After 5 years, the solution for this issue is no longer working, even the same version of TexLive. Commented Jun 7, 2023 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .