I use \usepackage{arqam} to change the numbering of chapters, sections, numbering of page ...
i want to de modifications on this files to obtain : الفصل الأول instead of الفصل 1 and ameliorate the table of contants
this is the arqam.sty
\typeout{ArqAm Document Style `arqAm' <25 sb.tmr 99>.}
\catcode`\@=11
%%%%%
\ifa@book
% 'a.dyf mA yly 4 'as.tr:
\renewcommand\thesection%
{\LR{\@arabic\c@section.\@arabic\c@chapter}}
%t.gyiyr 220698
\renewcommand\thesubsection %
{\LR{\@arabic\c@subsection.\@arabic\c@section.\@arabic\c@chapter}}
\renewcommand\thesubsubsection % 'a.dyf 'amryn al-sAbq w-al-lA.hq
{\LR{\@arabic\c@subsubsection.\@arabic\c@subsection.\@arabic\c@section.%
\@arabic\c@chapter}}
% 220698
\fi
%%%
\ifa@article
\renewcommand\thesection {\LR{\@arabic\c@section}} %t.gyiyr 220698
\renewcommand\thesubsection {\LR{\@arabic\c@subsection.\@arabic\c@section} }
\renewcommand\thesubsubsection % 'a.dyf 'amryn al-sAbq w-al-lA.hq
{\LR{\@arabic\c@subsubsection.\@arabic\c@subsection.\@arabic\c@section}
}
\fi
% ****************************************
% * SECTIONS *
% ****************************************
\def \a@c@section {\a@startsection
{section}{1}{\z@}{-3.5ex plus-1ex minus -.2ex}{2.3ex plus.2ex}%
%{\reset@font \Large\setnashbf }}
{\tr@ceoff \reset@font \Large \tr@ceon \setnashbf }}
\def \a@c@subsection {\a@startsection
{subsection}{2}{\z@}{-3.25ex plus-1ex minus-.2ex}{-1.5ex plus.2ex}%
%{\reset@font \large\setnashbf }}
{\tr@ceoff \reset@font \large \tr@ceon \setnashbf }}
\def \a@c@subsubsection {\a@startsection
{subsubsection}{3}{\z@}{-3.25ex plus -1ex minus-.2ex}{-1.5ex plus.2ex}%
%{\reset@font \normalsize\setnashbf }}
{\tr@ceoff \reset@font \normalsize \tr@ceon \setnashbf }}
\def \a@c@paragraph {\a@startsection
{paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}%
%{\reset@font \normalsize\setnashbf }}
{\tr@ceoff \reset@font \normalsize \tr@ceon\setnashbf }}
\def\a@c@subparagraph {\a@startsection
{subparagraph}{5}{\parindent}{3.25ex plus1ex minus .2ex}{-1em}%
%{\reset@font \normalsize\setnashbf }}
{\tr@ceoff \reset@font \normalsize \tr@ceon\setnashbf }}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%240999
\def\a@sect #1#2#3#4#5#6[#7]#8{% Arabic mode
\ifnum #2 > \c@secnumdepth \let \@svsec \@empty
\else \refstepcounter{#1}%
\edef \@svsec {\hskip 1em \nxp\RL {\csname the#1\endcsname}}%
\fi \@tempskipa #5\relax \ifdim \@tempskipa > \z@
\begingroup \let \end \a@@par
#6\relax \set@arabfont % style
\a@hangfrom {\hskip #3\relax \@svsec }% section number
\test@token #8 \end
\endgroup
\csname #1mark\endcsname {\RL {#7}}% 161099
\addcontentsline {toc}{#1}%
{\ifnum #2 > \c@secnumdepth \else
\protect\numberline {\csname the#1\endcsname }\fi
\protect\RL {#7}}%
\else \def \@svsechd % saved head, executed by \everypar
{\putwordb@x {#6\xpa\RL{#8}% $\bullet\hspace{-2truemm}-$}%
\@svsec\hskip #3\relax}%
\csname #1mark\endcsname {\RL {#7}}%
\addcontentsline {toc}{#1}%
{\ifnum #2>\c@secnumdepth \else
\protect\numberline {\csname the#1\endcsname}\fi
\protect\RL {#7}}}% \@svsechd
\fi \a@xsect {#5}}
%%%%%240999
%%%
% ****************************************
% * PAGE STYLES *
% ****************************************
\if@twoside % If two-sided printing.
\def \ps@headings {% for arabic mode
\let \@mkboth \markboth \def\@oddfoot{}\def\@evenfoot{}%
\def \@evenhead {\edef \thepage {\nxp\RL{\thepage }}% left heading
\leftmark \hfil \LR{\thepage} }% \LR 311098
\def \@oddhead {\edef \thepage {\nxp\RL{\thepage}}% right heading
\def \chaptermark ##1{\markboth {##1%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\hskip 1em\relax \RL{\@chapapp \space \thechapter }%
\fi\fi }{}}%
\def \sectionmark ##1{\markleft {##1\ifnum \c@secnumdepth >\@ne
\hskip 1em\relax \RL{\thesection}\fi }}%
\ifa@article
\def \subsectionmark ##1{\markleft {##1\ifnum \c@secnumdepth >\@ne
\hskip 1em\relax \RL{\thesubsection }\fi }}%
\fi }
\else % If one-sided printing.
\def \ps@headings {% for arabic mode
\let \@mkboth \markboth \def \@oddfoot{}\def \@evenfoot{}%
\def \@oddhead {\edef \thepage {\nxp \LR{\thepage}}% right heading
\LR{\thepage} \hfil \rightmark }%
\def \chaptermark ##1{\markright {##1%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\hskip 1em\relax \RL{\@chapapp\space $\thechapter$ }%
\fi\fi }}}
\fi
\def \ps@plain {% for arabic mode
\let \@mkboth\@gobbletwo \let\@oddhead\@empty \let\@evenhead\@empty
\def \@oddfoot {\edef \thepage {\nxp\LR{ \thepage }}% right heading
\hfil \LR{\thepage} \hfil }%
\let \@evenfoot\@oddfoot }
\def \ps@myheadings {% for arabic mode
\let\@oddfoot \@empty \let\@evenfoot \@empty
\def \@oddhead {\edef \thepage {\nxp \LR{\thepage }}% right heading
\LR{\thepage} \hfil \rightmark }%
\def \@evenhead {\edef \thepage {\nxp\LR{\thepage }}% left heading
\leftmark \hfil \LR{\thepage} }%
\let\@mkboth\@gobbletwo \let\subsectionmark\@gobble
\let\chaptermark\@gobble \let\sectionmark\@gobble }
%%%%ktAbT al-.sf.hT al-'awlY mn al-bAb wrqmh
\def\a@makechapterhead #1{% make heading with number
\null \vskip 50\p@
\begingroup \let \end \a@@par \a@@raggedright \interlinepenalty\@M
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\edef \thechapter {\@chapapp \space \LR{\thechapter} }%
\huge \nashbf \set@arabfont \test@token {\thechapter } \end
\nobreak \vskip 20\p@
\fi\fi
\Huge \nashbf \set@arabfont \test@token #1 \end
\nobreak \vskip 40\p@
\endgroup }
%%%%*********************************************************************
\ifa@book
\renewcommand\theequation{\@arabic\c@equation.\@arabic\c@chapter}
\pagestyle{headings}
\else
\pagestyle{plain}
\fi
\pagenumbering{arabic}
\if@twoside
\else \raggedbottom
\fi
\if@twocolumn \twocolumn \sloppy \flushbottom
\else \onecolumn
\fi
%\else %============= arabart.cls ==================================
% Default initializations
\ifa@book \pagestyle{headings} \else \pagestyle{plain} \fi
\pagenumbering{arabic} % Arabic page numbers
% ****************************************
\catcode`\@=\active
And this a minimal example
\documentclass[12pt]{arabbook}
%%%%%%%%%%% packages
\usepackage{fancyhdr}
\usepackage{arabtex}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{arqam}
\usepackage{amsfonts}% R ensemble des nombres reels
\usepackage{graphicx}% ajouter des photos
\usepackage{pstricks}% pour dessiner
%%%%%%%%%%%% ab3ad AlsfhA
\textwidth= 15truecm %
\textheight= 22.27truecm %
\hoffset= -1.5 cm%truecm %
\voffset= -1.5 cm%truecm %
%%%%%%%%%%
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1.5pt}
\renewcommand{\footrulewidth}{1.5pt}
\renewcommand{\baselinestretch}{1.5}
% `dm Alt^skyl
\novocalize
\begin{document}
\begin{arabtext}
\tableofcontents
\chapter{Alzmr}
\section{t_dkyr}
\section{tmAryn}
\end{arabtext}
\end{document}
arqam.sty. Can you please explain what do you mean by ameliorate the table of contants? – touhami Jun 14 '19 at 19:59