0

This is a follow-on from Table of contents page's number doesnt match the numbering style when i use foreign language "arabic". There the OP had difficulties with the page numbers of entries in the ToC. This a slimmed down version of the MWE which shows the problem and a solution.

% tocarabicprob2.tex  (based on SE 586620)
\documentclass[12pt,a4paper,twoside]{book}
\usepackage[Bjornstrup]{fncychap}
\pagestyle{plain}

\makeatletter \let\origpsplain\ps@plain \makeatother

\usepackage[arabic,main=english]{babel}

%%%%% try with and without this (arabic babel changes the definition of the plain pagestyle) \makeatletter \let\ps@plain\origpsplain \makeatother

\usepackage{comment}

\begin{document} \nocite{*} \frontmatter

\addcontentsline{toc}{chapter}{Acknowledgment} \centerline{\textsc{Acknowledgment}} First

\clearpage

\addcontentsline{toc}{chapter}{Notation} \centerline{\textsc{Notation:}} Note \clearpage

% this was in the original but did not affect any numbering \begin{comment} \begin{otherlanguage}{arabic} \begin{center} \Large{الملخص} \end{center} \begin{center} \large{وبنيته وبعض البنيات الجزئية فيه.} \end{center} \end{otherlanguage} \end{comment}

\tableofcontents \addcontentsline{toc}{chapter}{Table of Contents}

\mainmatter

\chapter{Preliminaries and Basic Concepts about Algebras} blah

\end{document}

The OP's problem was that the page numbers changed from Roman to Arabic numbers with no intent on the part of the OP.

The basic problem here is that \usepackage[arabic,main=english]{babel} redefines the plain pagestyle (as noted by @Davislor in his answer to the original question). Why should the package interfere with the pagestyle and what could/should be done about it?

Davislor
  • 44,045
Peter Wilson
  • 28,066
  • language files can redefine stuff. But this is not a babel problem, but a problem of arabic, and as this is basically unmaintained it is not something that can be easily changed or corrected. – Ulrike Fischer Mar 11 '21 at 19:47
  • This is verging on an opinion-based question, but keep in mind that authors might want to change the numerals, and it might be necessary to change the text direction for numbers in that package. – Davislor Mar 11 '21 at 19:47
  • The pragmatic answer is: switch to fontspec and \babelprovide[import=ar]{arabic}. – Davislor Mar 11 '21 at 19:49

0 Answers0