How I can change "Figs. 1 and 3" to "Figs. 1 et 3"?
The cleveref
package is babel
-aware, so it suffices to load babel
and add french
to the cleveref
options. In this example I've turned off the :
shorthand defined for French because your labels have :
in them.
In fact the use of babel
isn't actually needed for this to work, you can simply pass the french
option to cleveref
and the French conjunction will be used.
When used this way, cleveref
will also adjust the names of the relevant elements correctly (Tableau(x) etc.).
\documentclass[10pt,a4paper]{article}
\usepackage[french,shorthands=!;?]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{todonotes}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage[nameinlink,capitalise,french]{cleveref}
\newcommand{\crefrangeconjunction}{--}
\begin{document}
\begin{figure}[t!]
\caption{Missing figure 1.}\label{fig:1}
\caption{Missing figure 2.}\label{fig:2}
\caption{Missing figure 3.}\label{fig:3}
\end{figure}
\obeylines
Single figure: \cref{fig:2}
Two figures: \cref{fig:1,fig:3}
Range of consecutive figures: \cref{fig:1,fig:2,fig:3}, \crefrange{fig:1}{fig:3}
\vspace{.5cm}
Single figure: \Cref{fig:2}
Two figures: \Cref{fig:1,fig:3}
Range of consecutive figures: \Cref{fig:1,fig:2,fig:3}, \Crefrange{fig:1}{fig:3}
\end{document}
You need to set the macro \crefpairconjunction
. Specifically, run
\newcommand{\crefpairconjunction}{ et }
after loading cleveref
.
See also p. 13 of the user guide of the cleveref
package.