The code below is for a part of a document, I have a number of issues:
The file only compiles upon removing either
fancyhdrsettings in the preamble, or upon removing the title page (which I borrowed from another post) in the front matter, but both in the same file do not work and give the error:warning (node filter): error: ...2019/texmf-dist/tex/generic/babel/babel-bidi- basic-r.lua:178: You cannot set field char in a node of type disc
All numbers are in English, I need numbers to appear either in accordance with its context (English with English text, Arabic with Arabic text) or in accordance with the main language which is Arabic (It would be good to know how both options work)
- English citations are not left aligned
- In the footers and headers settings made by
fancyhdr, I set it so that chapter names appear before page numbers, I need the same numbering style to appear in the table of contents. - I have set the chapter names to appear in letters not in numbers but in Arabic. However, in header, it says
Chapter1, notChapter One.
Here is an MWE, it is a bit long, but I need to make sure no package conflict will appear upon reaching a solution:
\documentclass[a4paper,12pt,twoside]{book}
%General Settings
\usepackage[a4paper,top=2.5cm,bottom=2.5cm,margin=2.5cm,bindingoffset=0.5cm]{geometry}
\usepackage{subfiles}
%==================== ============================================================================
% Fonts%
%==================== ============================================================================
\usepackage{arabluatex}
\usepackage{mathpazo}
\usepackage{microtype}
%==================== ============================================================================
% Layout: Paragraphing - section titles, Items%
%==================== ============================================================================
% Paragraphing
\usepackage{indentfirst}
\renewcommand{\baselinestretch}{1.5}
\setlength{\parskip}{1em}
%Section titles
\setcounter{secnumdepth}{6}
\usepackage[compact]{titlesec}
\titlespacing{\section}{0pt}{*0}{*0}
\titlespacing{\subsection}{0pt}{*0}{*0}
\titlespacing{\subsubsection}{0pt}{*0}{*0}
% Text layout
\usepackage{multicol}
\usepackage{ulem}
% Items
\usepackage{enumitem}
\setlist[itemize]{noitemsep, topsep=0pt}
\usepackage{rotating}
%=================================================================================================
%Graphics - pictures - symbols
%=================================================================================================
\usepackage{pifont}
\usepackage{textcomp}
\usepackage{url,graphicx}
\graphicspath{{images/}{../images/}}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,arrows,positioning,matrix,quotes, shapes.geometric,calc}
\usepackage[breakable,skins]{tcolorbox}
\newtcolorbox{hl}{%
frame empty, sharp corners, top=0pt, right=0pt, bottom=0pt, left=0pt,
boxsep=0pt, toprule=0pt, rightrule=0pt, bottomrule=0pt, leftrule=0pt,
colback=lightgray, fontupper=\bfseries,
before upper=\selectlanguage{arabic}%
{\color{white}\vrule width 1.5em},
after upper={{\color{white}\leaders\vrule\hfill\null}},
before=\noindent\begingroup\selectlanguage{english},after=\endgroup,
}
%Set New command for inserting a page border%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{eso-pic} % use it along with the "etoolbox" package for page border
\newcommand{\insertpageborder}{%
\AddToShipoutPictureBG*{%
\begin{tikzpicture}[remember picture, overlay]
\draw[line width = 4pt] ($(current page.north west) + (1in,-1in)$) rectangle ($(current page.south east) + (-1in,1in)$);
\end{tikzpicture}}}
%==================================================================================================
%CROSS-Referencing
%==================================================================================================
\usepackage[%
hidelinks,
colorlinks=true,
allcolors=blue]{hyperref}
\usepackage{tocbibind}
\usepackage[acronym]{glossaries}
\usepackage{nomencl}
\usepackage[xindy]{imakeidx}
\makeindex
\makeglossaries
%===================================================================================================
%Tabular Environment
%===================================================================================================
\usepackage{multirow}
\usepackage{array}
\usepackage{booktabs}
%======================================================================================================
%MAths Environment%
%======================================================================================================
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{definition}
\newtheorem{dfn}[thm]{Definition}
%======================================================================================================
%Babel Package Settings%
%======================================================================================================
\usepackage{filecontents}
\begin{filecontents}{babel-syc.ini}
[identification]
charset = utf8
version = 0.1
date = 2019-08-25
name.local = ܠܫܢܐ ܣܘܪܝܝܐ
name.english = Classical Syriac
name.babel = classicalsyriac
tag.bcp47 = syc
tag.opentype = SYR
script.name = Syriac
script.tag.bcp47 = Syrc
script.tag.opentype = syrc
level = 1
encodings =
derivate = no
[captions]
[date.gregorian]
[date.islamic]
[time.gregorian]
[typography]
[characters]
[numbers]
[counters]
\end{filecontents}
\begin{filecontents}{babel-cop.ini}
[identification]
charset = utf8
version = 0.1
date = 2019-08-25
name.local = ϯⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ
name.english = Coptic
name.babel = coptic
tag.bcp47 = cop
tag.opentype = COP
script.name = Coptic
script.tag.bcp47 = Copt
script.tag.opentype = copt
level = 1
encodings =
derivate = no
[captions]
[date.gregorian]
[date.islamic]
[time.gregorian]
[typography]
[characters]
[numbers]
[counters]
\end{filecontents}
\usepackage[nil,bidi=basic-r,layout=counters]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}
\babelprovide[import=el]{polutonikogreek}
\babelprovide[import=syc]{classicalsyriac}
\babelprovide[import=cop]{coptic}
\babelprovide[import=he]{hebrew}
\babelprovide[import=de,language=Default]{German}
\babelprovide[import=fr,language=Default]{French}
\babelprovide[import=hu,language=Default]{Hungarian}
\babelfont{rm}{Latin Modern Roman}
\babelfont[arabic]{rm}{Simplified Arabic}
\babelfont[english]{rm}{Times New Roman}
\babelfont[classicalsyriac]{rm}{Serto Jerusalem}
\babelfont[coptic]{rm}[Language=Default]{FreeSerifAvvaShenouda}
\babelfont[polutonikogreek]{rm}[Language=Default]{Palatino Linotype}
\babelfont[hebrew]{rm}[Language=Default]{Ezra SIL}
% Don't need special language settings for Hieroglyphs
%\babelfont{hieroglyphs}{Noto Sans Egyptian Hieroglyphs}
%==================================================
%References%
%===================================================
\begin{filecontents}{\jobname.bib}
@book{Sharoni1969,
author = {ميخائيل، ملاك and الشاروني، حبيب},
date = {1969},
title = {المرجع فى قواعد اللغة القبطية},
location = {الاسكندرية},
publisher = {جمعية مارمينا العجايبي},
langid = {arabic}
}
@book{Browning1983,
author = {Browning, Robert},
date = {1983},
title = {Medieval and Modern Greek},
publisher = {Cambridge University Press},
langid = {english}
}
@misc{CBible2015,
date = {2015},
title = {\foreignlanguage{english}{Coptic Bible} الكتاب المقدس القبطي},
langid = {arabic}
}
@online{Website:Elpenor,
title = {ELPENOR - Home of the Greek Word - Ellopos},
date = {2015-05},
url = {https://www.ellopos.net/elpenor/Default.asp},
langid = {english}
}
\end{filecontents}
%=============================================================
%BIBLIOGRAPHY SETTINGS%
%=============================================================
\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{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}}}
%=========================================================================================
%Chapter headings: Naming - Font properties %
%=========================================================================================
% Change chapter heading properties: Centered
\makeatletter
\def\@makechapterhead#1{%
\vspace*{-30\p@}%
{\parindent \z@ \centering \normalfont % centering, ragged right, ragged left
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip -15\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip -15\p@
}}
\def\@makeschapterhead#1{%
\vspace*{-15\p@}%
{\parindent \z@ \centering % centering, ragged right, ragged left
\normalfont
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip -15\p@
}}
\makeatother
% Chapter Naming
\gappto\captionsarabic{\renewcommand{\chaptername}{الباب}} %to name the chapter title الباب instead of باب
\gappto\captionsarabic{\renewcommand{\appendixname}{الملحق}} %to name the chapter title ملحق instead of ملاحق
%%%%% END MACRO Litteral Numbering of chapters
\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
الأول\or
الثاني\or
الثالث\or
الرابع\or
الخامس\or
السادس\or
السابع\or
الثامن\or
التاسع\or
العاشر\or
الحادي عشر\or
الثاني عشر\or
الثالث عشر\or
الرابع عشر\or
الخامس عشر\or
السادس عشر\or
السابع عشر\or
الثامن عشر\or
التاسع عشر\or
العشرون\or
\else
I need more words أحتاج إلى المزيد من ترقيمات الأبواب بالحروف في ملف arbbook.cls\fi}
%%% You can add by the same if there is more then ten chapters
%next three lines is to make chapter naming use the above wordings (literal numbering in Arabic words)
\usepackage{etoolbox} %% uncomment if 'etoolbox' isn't already being loaded
\makeatletter
\patchcmd{\@makechapterhead}{\thechapter}{\words{chapter}}{}{}
\makeatother
%%%%% END MACRO Litteral Numbering of chapters
%==================================================
%Headers and Foters %
%===================================================
% For header and footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{\rightmark}
\rhead{\leftmark}
\cfoot{\thechapter-\thepage}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{2pt}
% Set header and footer for other pages than normal ones
\fancypagestyle{plain}{%
\fancyhf{}
\chead{\leftmark}
\cfoot{\thechapter-\thepage}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{2pt}}
%==================================================
%Start actual document %
%===================================================
%==================================================
%Start actual document %
%===================================================
\title{jhhjjhhj}
\author{}
\date{}
\begin{document}
\begin{frontmatter}
\pagenumbering{alph} % Change page numbering from roman to alphabetic
\begin{titlepage} %\maketitle %option titlepage ends the page after \maketitle and restarts on the next page, titel page option is equivalent to \make title + \clearpage
%----------------------------------------------------------------------------------------
% TITLE PAGE
%----------------------------------------------------------------------------------------
% Suppresses displaying the page number on the title page and the subsequent page counts as page 1
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for horizontal lines, change thickness here
\center % Centre everything on the page
%------------------------------------------------
% Page Border
%------------------------------------------------
\insertpageborder
%------------------------------------------------
% First Figure
%------------------------------------------------
\centering{\includegraphics[scale=0.25]{F-0_1}}
%------------------------------------------------
% Headings
%------------------------------------------------
\textsc{\LARGE gfdfdgdfg}\\[1.5cm] % Main heading such as the name of your university/college
\textsc{\Large fgdfgdfgfdg}\\[0.5cm] % Major heading such as course name
\textsc{\large fdgfdgfdgfg}\\[0.5cm] % Minor heading such as course title
\textsc{\large gfdgfdgfdgfdg}\\[0.5cm] % Minor heading such as course title
%------------------------------------------------
% Title
%------------------------------------------------
\HRule\\[0.4cm]
{\huge\bfseries
dffddf \\
dffddfdf}\\
[0.4cm] % Title of your document
\HRule\\[0.4cm]
%------------------------------------------------
% Second Figure
%------------------------------------------------
\centering{\includegraphics[scale=0.25]{F-0_2}}
%------------------------------------------------
% Author(s)
%------------------------------------------------
\begin{minipage}{0.4\textwidth}
\begin{flushleft}
\large
\textit{cxzxcxzcxzc}\\
B.J. \textsc{Blazkowicz} % Your name
\end{flushleft}
\end{minipage}
~
\begin{minipage}{0.4\textwidth}
\begin{flushright}
\large
\textit{bvcbvcb}\\
Dr. Caroline \textsc{Becker} % Supervisor's name
\end{flushright}
\end{minipage}
% If you don't want a supervisor, uncomment the two lines below and comment the code above
%{\large\textit{Author}}\\
%John \textsc{Smith} % Your name
%------------------------------------------------
% Date
%------------------------------------------------
\vfill\vfill\vfill % Position the date 3/4 down the remaining page
{\large\today} % Date, change the \today to a set date if you want to be precise
%------------------------------------------------
% Logo
%------------------------------------------------
%\vfill\vfill
%\includegraphics[width=0.2\textwidth]{1-ARCHANGEL}\\[1cm] % Include a department/university logo - this will require the graphicx package
%----------------------------------------------------------------------------------------
\vfill % Push the date up 1/4 of the remaining page
\end{titlepage}
\tableofcontents
\end{frontmatter}
\chapter{سسسييسسييس}
\section{ مقدمة}
\section{مقدمة عن تاريخ الكتابة المصرية القديمة}
\section{مقدمة عن تاريخ الكتابة المصرية القديمة}
\section{مقدمة عن تاريخ الكتابة المصرية القديمة}
. حيث حُذِفَت علامة الرفع (وس) وايضاً حُذِفَت الحركة الأولى (أي) والتي ظنها العرب استهلال يتبقى اسم قبط
\footcites[13]{Sharoni1969}[2]{Browning1983}
وهى مأخوذة من "حام" بن نوح
\footcite[12-13]{CBible2015}
سيبيسبيسبسيب
\footcite[12-13]{Website:Elpenor}
سيبيسبيسبسيب
\footcite{Browning1983}
بيلبيلبيلبيلبيلبيل
\footcites[13]{Sharoni1969}
\newpage
\printbibliography
\printbibliography[keyword={Arabic},title={المراجع العربية},heading=subbibliography]
{
\selectlanguage{english}
\printbibliography[keyword={English}, title={ُEnglish References}, heading=subbibliography]
}
\end{document}




alphafter\frontmatterand never change things after that. I thought you wanted chapter-page format in arabic numbers? – David Purton Aug 26 '19 at 11:32\footcitesand one reference is in English and the other in Arabic? – David Purton Aug 26 '19 at 11:47\frontmatter…\mainmatter. (No begin and end). – David Purton Aug 26 '19 at 11:54