1

I am preparing a document where I am using Biblatex + Polyglyossia + XELATEX. I have citations in both languages English and Arabic. The localized items appear in English in Arabic citations, also upon using the cs quotes package which is a must in biblatex package, CS QUOTES have no quotation for Arabic language. I have 3 issues:

  • How to make footnote citations and bibliography change from right to left or left to right according to language

  • Localized items (the words edition, page,seenote,and), how to remove them or make them appear according to the citation language

  • CS quotes have no definition for Arabic language.

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,margin=2.5cm,bindingoffset=0.5cm]{geometry} 
\usepackage{fontspec} 
\usepackage{csquotes}
\usepackage{polyglossia} 
\setdefaultlanguage[calendar=gregorian,locale=default,numerals=mashriq]{arabic}
\setotherlanguages{english}
\newfontfamily\arabicfont[Script=Arabic,Mapping=arabicdigits]{Simplified Arabic} 
\usepackage[backend=biber,language=autobib,autolang=hyphen,citestyle=verbose-note,bibstyle=authortitle,doi=false,isbn=false,block=none,]{biblatex} 
\addbibresource{D:/SC/PROJ/Subfile Package Solution - Biblatex/With_all_set_up.bib} 
\title{}
\author{}
\date{}
\begin{document}
\chapter{}
مع المثلة مثال
\footcite[256]{Sharoni1969}
\newpage
مع المثلة مثال
\footcite{Sharoni1969}
\printbibliography
\end{document}

Here is the reference format

@book{Sharoni1969,
 author = {ميخائيل، ملاك  and  الشاروني، حبيب},
 year = {1969},
 title = {المرجع فى قواعد اللغة القبطية},
 address = {الاسكندرية},
 publisher = {{جمعية مارمينا العجايبي}}
}

@book{Browning1983,
 author = {Browning, Robert},
 year = {1983},
 title = {Medieval and Modern Greek},
 publisher = {{Cambridge University Press}},
 isbn = {0521299780 9780521299787}
}

p.1 p.2 Bibliography

4

I couldn't do this with polyglossia and xelatex.

But here's a go with babel and lualatex that might offer a way forward.

You have to create arabic.lbx for strings for biblatex and define Arabic quotes for csquotes. (I'm not sure about either the quotes or the translations…)

MWE

There's some comments in the code below explaining things a bit.

\documentclass[12pt]{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{Sharoni1969,
 author = {ميخائيل، ملاك  and  الشاروني، حبيب},
 year = {1969},
 title = {المرجع فى قواعد اللغة القبطية},
 address = {الاسكندرية},
 publisher = {جمعية مارمينا العجايبي},
 langid = {arabic}
}
@book{Browning1983,
 author = {Browning, Robert},
 year = {1983},
 title = {Medieval and Modern Greek},
 publisher = {Cambridge University Press},
 langid = {english}
}
\end{filecontents}

\begin{filecontents}{arabic.lbx}
\ProvidesFile{arabic.lbx}
\InheritBibliographyExtras{english}
% Translations thanks to Google Translate.
% I haven't provided abbreviations, because I don't know Arabic.
% You'll need to add more for other strings you use.
% Look in `english.lbx` for the string name.
\DeclareBibliographyStrings{%
  inherit          = {english},
  and              = {{و}{و}},
  page             = {{صفحة}{صفحة}},
  pages            = {{صفحات}{صفحة}},
  references       = {{مراجع}{مراجع}},
  seenote          = {{انظر الملاحظة}{انظر الملاحظة}},
}
\end{filecontents}

\usepackage[nil,bidi=basic-r]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}
\babelfont[arabic]{rm}{Amiri}
\babelfont[english]{rm}{Latin Modern Roman}

\usepackage{csquotes}
\DeclareQuoteStyle{arabic}
  {\guillemotleft}
  {\guillemotright}
  {\textquotedblright}
  {\textquotedblleft}

\usepackage[language=auto,autolang=other,citestyle=verbose-note,bibstyle=authortitle,doi=false,isbn=false]{biblatex} 
\addbibresource{\jobname.bib}

\defbibenvironment{bibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item\leavevmode}% add \leavevmode to align English bibliography items RTL

% Always use Arabic digits for see note.
\usepackage{xpatch}
\xpatchbibmacro{footcite:note}
  {\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}
  {\foreignlanguage{arabic}{\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
  {}
  {}

% Just to test if quotes work
\DeclareFieldFormat{title}{\mkbibquote{\mkbibemph{#1}}}

\begin{document}
\null\vfill
مع المثلة مثال \autocite[256]{Sharoni1969}.
مع المثلة مثال \autocite{Sharoni1969}.

مع المثلة مثال \autocite[256]{Browning1983}.
مع المثلة مثال \autocite{Browning1983}.

% With the above, the language changes back to Arabic before the final period
% is inserted, so it ends up being to the left of the note. This looks a bit
% odd to me, but the only way I could get the period at the right hand side of
% the note was to put it inside a footnote like this:
مع المثلة مثال\footnote{\cite{Browning1983}.}
\printbibliography
\end{document}

MWE output

| improve this answer | |
  • @ David: I have only one issue with this solution, I am using other languages including "Coptic, Greek, Cyriac, Hebrew, Hungarian" and I need to use the system fonts "OTF" fonts used by windows. Is this allowable with babel and lualatex?? – Silva Aug 24 '19 at 16:46
  • your solution is flawless, I used you exact solution with a little modification, I replaced the babel package with polyglyossia, and everything worked except the part where you want the english text to be aligned from left to right, can you help me out?? Also the word bibliography is in English not arabic – Silva Aug 25 '19 at 2:00
  • @Silva, I was unable to get things working satisfactorily with polyglossia and xelatex. I think that biblatex does not work well with RTL languages with the bidi package. Hence my answer with lualatex and babel. There is no problem using system OTF fonts with lualatex and babel. You have complete control over what font you want to use for what language. – David Purton Aug 25 '19 at 4:43
  • @Silva, I will see if I can provide and answer to your question at tex.stackexchange.com/questions/504609/… to show usage for the different fonts. – David Purton Aug 25 '19 at 4:44
  • @ if that is the case, the I would be grateful if you can help me out regarding defining the following languages along with their otf fonts since I am currently using all of them: – Silva Aug 25 '19 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.