I was trying to use Roman and Arabic page numbers in my thesis, I use a method that redefines plain page style, the total method is my previous question here command \pagenumbering can't change numbers style i . This method somehow changes toc's style. the total language of my document is Arabic. the new toc doesn't align different levels's numbers on the right side. this is the first problem. and here is the MWC:

\usepackage[LAE, T1]{fontenc}
\usepackage[arabic, english]{babel}

\renewcommand{\EI}[1]{\textLR{\FarsiEncoding  \textLR{#1}}}%
\renewcommand \thechapter {\textLR{\arabic{chapter}}}
%% redefine plain page

\TOCLanguage{arabic} % arabic is the main language 

الملخص العربي 
\textLR{ English abstract\ldots}
\chapter*{كلمة الشكر}
نص باللغة العربية   
نص باللغة العربية\\
\section{القسم }
نص باللغة العربية\\
\subsection{قسم فرعي}
\subsection{قسم فرعي}


this give the following result: chapter, sec, subsec numbers aren't right aligned the problem is that the numbers of different levels aren't right aligned, so I tried to fix this problem using tocloft package and I add to the privious MWC the following commands:


this gives the following result : <code>indent</code> and <code>numwidth</code> values still start from left side

This commands that changes the indent and numwidth values but it seems that these numbers starts from left side of the page and it changes the page numbers alignment instead of section and sub section alignment. I tried also to put and numwidth to 1em and add some spaces before or after section's numbers like :

\renewcommand{\cftsecpresnum}{\quad}% Inserted before \section numbers in ToC
\renewcommand{\cftsubsecpresnum}{\qquad}% Inserted before \section numbers in ToC 

this give the following result where the numbers and titles are interfered numbers and titles are interfered so how can I solve this problem or how can I refine commands \@tocrmarg and \@pnumwidth on different levels (chapter ,sec,..) to fix this problem.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.