I ask another question related to this one "Literal" numbering of chapters but not in contents which was not "precise"... This question is the exact one, with an example...
This example gives me chapters "one" and "two" in the first pages of chapters (and this is what I want), and in the contents "1" and "two" (and this isn't what I want..). I want to obtain the same thing in the text but, in the contents, "1" and "2".. Then how to change the chapterhead, to be numeric.. I want it "1.1" for the section 1 not "one.1" like in my example.
I write all the packages for preventing eventual conflicts because I use all this packages in my book (of probability in arabic)...
\documentclass[14pt,a4paper]{extbook}%{article}%
\usepackage{titletoc}
\usepackage{etoolbox}
\usepackage{multicol}
\usepackage{amsmath,amssymb}
\usepackage[most]{tcolorbox}
\usepackage{boxedminipage}
\usepackage{slashbox}
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage{minitoc}
\usepackage{rotating}
\usepackage{fmultico}
\setlength{\columnseprule}{0.1pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{pdflscape}
\usepackage{array}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage[numerals=maghrib]{arabic}
\makeatletter
\let\old@makechapterhead\@makechapterhead
\def\@makechapterhead{\def\thechapter{\words{chapter}}\old@makechapterhead}
\makeatother
\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
one\or
two\or
three\or
\else
I need more words\fi}
\begin{document}
\tableofcontents
\chapter{Simulation}
\section{Introduction 1}
Simulation
\section{Introduction 2}
\chapter{Simulation}
Simulation
\end{document}
polyglossiapackage loaded -- as long as thetitletocpackage is not loaded. Please elaborate what you mean by "does not have any effect". Which TeX distribution do you use, by the way? – Mico May 09 '14 at 09:26\titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge} \titlespacing{\chapter} {0pt}{40pt}{-10pt}
I don't know why I use this, I think it's connected with minitableofcontents !!...
So when I comment it, all is very well !! it writes me litteral numbering for chapter... الباب الأول... الباب الثاني...
– Faouzi Bellalouna May 09 '14 at 10:46