0

I'm writing my thesis using Latex, the document is in Arabic using Polyglossia, and managing the bibliography using biblatex.

All the references are in English, as a result the reference Page is like this:

enter image description here

However, the references must left to right.

How can I do it ?

The Main latex File:

\documentclass[a4paper.13pt,arabic]{book}

%Packages

\usepackage{tocloft}

\usepackage{graphicx}
\usepackage{polyglossia}
\usepackage[LFE,LAE]{fontenc}
\usepackage{titlesec}
\usepackage{fmtcount}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\usepackage{hyperref}
\hypersetup{pdftex,colorlinks=true,allcolors=black}
\usepackage{hypcap}
\usepackage[backend=biber,bibencoding=utf8,style=ieee]{biblatex}    
%\addbibresource{MyLibrary.bib}

\addbibresource{./Biblography/MyLibrary.bib}

%Language settings for polyglossia
\setmainlanguage{arabic}
\setotherlanguage{english}
\setmainfont{Simplified Arabic}
\newfontfamily\arabicfont[Script = Arabic]{Simplified Arabic} 
\let\arabicfonttt\ttfamily
\setkeys{arabic}{numerals=maghrib,locale=mashriq,calendar=gregorian}

%change arabic translation of the word chapter
\addto\captionsarabic{\renewcommand{\chaptername}{الفصل}}
\addto\captionsarabic{\renewcommand{\bibname}{المراجع}}
%modifying the "the.." commands to match the new style of chapter and section numbering
\renewcommand{\thechapter}{\arabic{chapter}~}
\renewcommand{\thesection}{\thechapter-~\arabic{section}~}
\renewcommand{\thesubsection}{\thesection-~\arabic{subsection}~}
\renewcommand{\thesubsubsection}{\thesubsection-~\arabic{subsubsection}~}
%resize subsection numbering 
\renewcommand{\cftsubsecnumwidth}{1.5cm}
%adding support for arabic ordinal numbers
\newcommand{\arabicordinal}[1]{\ifcase\value{#1}
        \or
            الأول
        \or
            الثاني
        \or
            الثالث
        \or
            الرابع
        \or
            الخامس
        \or
            السادس
        \or
            السابع
        \or
            الثامن
        \or
            التاسع
        \or
            العاشر
        \or
            الحادي عشر
        \or
            الثاني عشر
        \or
            الثالث عشر
        \or
            الرابع العاشر
        \or
            الخامس عشر
        \fi
    }

%modifying the styles of chapter, section, subsection and subsubsection
\titleformat{\chapter}[display]{\normalfont\huge\bfseries\centering}{\chaptername~\arabicordinal{chapter}}{5pt}{\normalfont\huge\bfseries}[\vspace{-0.5ex}\rule{\textwidth}{1pt}]
\titleformat{\section}{\normalfont\normalsize\bfseries}{\thesection-~}{0.5em}{\normalfont\normalsize\bfseries}
\titleformat{\subsection}{\normalfont\normalsize\bfseries}{\thesubsection-~}{0.5em}{\normalfont\normalsize\bfseries}
\titleformat{\subsubsection}{\normalfont\normalsize\bfseries}{\thesubsubsection-~}{0.5em}{\normalfont\normalsize\bfseries}



%finally the document
\begin{document}


\author{م. أسامه ناصر}
\title{استخدام البروز البصري في ضغط الصور الرقمية}


\frontmatter
\maketitle
\tableofcontents

\mainmatter
\include{./TeX_files/Chapter1/Chapter1}

\backmatter
% bibliography, glossary and index would go here.



\printbibliography
\addcontentsline{toc}{chapter}{المراجع}
\end{document}

This is a simpler version of my main tex file with biblatex-example.bib:

\documentclass[a4paper,12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{polyglossia}
\usepackage[LFE,LAE]{fontenc}


\usepackage[backend=biber,bibencoding=utf8,style=ieee]{biblatex}    


\addbibresource{biblatex-examples.bib}

\setmainlanguage{arabic}
\setotherlanguage{english}
\setkeys{arabic}{numerals=maghrib,locale=mashriq,calendar=gregorian}


\setmainfont{Simplified Arabic}
\newfontfamily\arabicfont[Script = Arabic]{Simplified Arabic} 
\let\arabicfonttt\ttfamily
\begin{document}

\author{أسامه ناصر}
\title{أطروحة اختبار}
\date{ 2013}


\frontmatter
\maketitle
\tableofcontents

\mainmatter
\chapter{اختبار}
هذا النص اختباري
\cite{sigfridsson}

\backmatter
% bibliography, glossary and index would go here.
\printbibliography
\end{document}

However, the editor must use Biber or the bibliography won't output

  • 2
    If your bibliography is in English you can try \begin{english}\printbibliography\end{english} (untested for lack of time). – moewe May 10 at 7:52
  • It gives this error "Undefined control sequence. \end" – Ossama Nasser May 10 at 8:01
  • Can you post the complete message from the .log file, please? \end really should not be undefined... (Would it be possible to make your example a little more minimal by removing unnecessary package and content? We also don't have your .bib file, so if you could use biblatex-examples.bib, which is installed on all systems with biblatex, and just cite sigfridsson that would make things easier for us.) – moewe May 10 at 8:02
  • l.106 \end {english} The control sequence at the end of the top line of your error message was never \def\'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Undefined control sequence. \abx@MakeMarkcase ->\MakeUppercase – Ossama Nasser May 10 at 8:17
  • 1
    Then write the title explicitly in Arabic. Or say something like \printbibheading \begin{english} \providecommand*{\MakeUppercase}[1]{#1} \printbibliography[heading=none] \end{english} – moewe May 10 at 8:37
1

Many Thanx to moewe for his answer:

\printbibheading
\addcontentsline{toc}{section}{المراجع}
\begin{english}
\providecommand*{\MakeUppercase}[1]{#1}
\printbibliography[heading=none]
\end{english}

It solved all my problem, including inserting the correct TOC location for references in the table of content

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.