As already pointed out, babel-french's option PartNameFull=false
provides a fix: then you get "Partie I", "Partie II" (Roman numerals) both in the document and in the TOC.
In order to get "Première partie" both in the document and in the TOC, you could try something like this:
\documentclass[french]{amsart}
\usepackage{babel}
\usepackage{blindtext}
% Patch amsart.cls:
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@sect}{\@seccntformat{#1}}%
{\ifx0#2\unskip.\quad\else\@seccntformat{#1}\fi}{}{}
% To get "Première partie." in the TOC:
\renewcommand{\tocpart}[3]{\indentlabel\ignorespaces
\ifcase#2\or{Première}\or{Deuxième}\or{Troisième}\else{?}\fi
\space\partnameord.\quad#3}
% To get "Partie 1." in the TOC only, uncomment these two lines:
%\renewcommand{\tocpart}[3]{\indentlabel\ignorespaces
% Partie\space#2.\quad#3}
\makeatother
\begin{document}
\tableofcontents
\part{Un essai}
\blindtext
\section{test test test}
\blindtext
\part{Second essai}
\end{document}
This works for up to three parts, extending the \tocpart
command is obvious in case you need more.
With amsbook.cls
, you could use etoolbox
this way:
\documentclass[french]{amsbook}
\usepackage{babel}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@part}{\ \thepart}{}{}{}
\makeatother
Each class would require a specific treatment, so I just provide the
PartNameFull=false
option in babel-french to work around this issue.
french
, because with your MWE I'm getting Première partie 1. Essai (note the extra ‘1’) and there is an extra space in the toc lines.