2

I would like to use Glenn from fncychap with polyglossia to looks like the following picture but it doesn't work at all

enter image description here

here's my MNW

\documentclass[12pt,a4paper]{extbook}
%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\usepackage[Glenn]{fncychap}

\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Amiri}
\setsansfont[Script=Arabic,Scale=1.5]{Amiri}

\begin{document}
\tableofcontents
\chapter{محسن}
\section{محسن}
\subsection{محسن}
\end{document}
  • 1
    try to load fncychap last. – touhami Feb 21 '17 at 16:25
  • yes it's works but i got باب 1 Instead of الباب الاول – Educ Feb 21 '17 at 16:33
1

Here is a solution

\documentclass[12pt,a4paper]{extbook}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Amiri}
\setsansfont[Script=Arabic,Scale=1.5]{Amiri}
\usepackage[Glenn]{fncychap}
\usepackage{etoolbox}
\makeatletter
\patchcmd\DOCH{{\@chapapp}\space \CNoV\thechapter}{\mtchapter}{}{}
\newcommand{\mtchapter}{%
الباب
\ifcase\value{chapter}\or
 الأول
\or
الثاني
\or
الثالث
\or
الرابع
\or
الخامس
\fi}
\makeatother

\begin{document}
\tableofcontents
\chapter{التحليل التوافقي}
\section{محسن}
\subsection{محسن}
\end{document}

enter image description here

  • 1
    For my case I prefer the small names for the chapternames.. the command \gappto\captionsarabic{\renewcommand{\chaptername}{الباب}} changes the name of the chapter and the command \ChNumVar{\Large} puts the literal chapter number in the good dimension – Faouzi Bellalouna Feb 21 '17 at 17:42
  • 1
    @Educ would you take a look, and find some small improvements, on the last edition of my answer on my publication you commented. Salam for you and touhami, and happy texifiying – Faouzi Bellalouna Feb 22 '17 at 5:31
  • @FaouziBellalouna Salam for you – touhami Feb 22 '17 at 14:56
  • please @touhami if I added commande for hyperref I get an error. \usepackage[bookmarksnumbered=true]{hyperref} \hypersetup{ colorlinks = true, linkcolor = blue, citecolor = blue, urlcolor = blue} – Poline Sandra Aug 8 at 18:37
  • @PolineSandra I am sorry, i can't ansower for now I have no arabtex no xelatex. Can you please ask new question with a MWE? – touhami Aug 9 at 9:47

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.