It is similar to this question, but both of its answer do not seem to work here.
I defined the title format as follows:
\usepackage[explicit]{titlesec}
\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}[display]
{\raggedleft}
{\MakeUppercase{\partname}~\thepart}
{1em}
{\MakeUppercase{#1}}
\usepackage[english,french]{babel}
Thus, ideally, one should see PARTIE I
in a new part. But actually one would see Première partie I
.
The method in the accepted answer does not have effect to this. On the other hand, with the following babel setting,
\frenchsetup{PartNameFull=false}
The result would become Partie I
, still not in uppercase.
How can I fix this behavior? Or is there some way to just show Première partie
without the I
in French mode?
Below is a MWE.
\documentclass{article}
\usepackage[explicit]{titlesec}
\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}[display]
{\raggedleft}
{\MakeUppercase{\partname}~\thepart}
{1em}
{\MakeUppercase{#1}}
\usepackage[english,french]{babel}
%% This produces "Partie"
% \frenchsetup{PartNameFull=false}%
%% These seem to have no effect
% \usepackage{etoolbox}
% \makeatletter
% \renewcommand\FB@emptypart{\def\thepart{\unskip}}
% \patchcmd{\@part}{\partname}{Partie}{}{}
% \makeatother
\begin{document}
\selectlanguage{french}
\part{Test}
\selectlanguage{english}
\part{Test}
\end{document}
ADD: I should mention that polyglossia
doesn't have this problem, but on the other hand, one cannot get things like Première partie
by its newly offered option frenchpart=true
without any effort --- a "patch failure" is reported.