我想使用Glenn
fromfncychap
和polyglossia
to 看起来像下面的图片,但它根本不起作用
这是我的 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
这是一个解决方案
\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}