2

Good night,

I use the package elsarticle for a publication in an Elsevier journal. I have problem handling French.

\documentclass[review]{elsarticle}
\usepackage[T1]{fontenc} 
\usepackage[english,francais]{babel}

Which cause the error message :

Package frenchb.ldf Warning: Figures' and tables' captions might look like
(frenchb.ldf)                `Figure 1:' which is wrong in French.
(frenchb.ldf)                Check your class or packages to change this;
(frenchb.ldf)                reported on input 

What should I do ? Thanks for your help.

1
  • 2
    Did you try \frenchbsetup{CustomiseFigTabCaptions=true} in your preamble?
    – Bernard
    Commented May 28, 2016 at 22:41

1 Answer 1

4

Update

As of version 3.2, there exists two new commands which can be used to define directly the keyword title and the abstract title, i.e. \keywordtitle, and \abstracttitle.

A better setup is as follows

\documentclass{elsarticle}
\usepackage[T1]{fontenc} 
\usepackage[english,french]{babel}
\usepackage{caption}

\usepackage{regexpatch}

\DeclareCaptionLabelSeparator{frenchcolon}{~: }
\captionsetup{labelsep=frenchcolon}
\keywordtitle{Mots cl\'es}
\abstracttitle{Résumé}
\keywordtitlesep{~:\/}
\makeatletter
\xpatchcmd{\printFirstPageNotes}
  {Email addresses}
  {Adresses email}
  {}{}
\xpatchcmd{\printFirstPageNotes}
  {Email address}
  {Adresse email}
  {}{}
\regexpatchcmd*{\printFirstPageNotes}{:}{\cA:}{}{}
\regexpatchcmd*{\keyword}{:}{\cA:}{}{}
\makeatother

\begin{document}

\begin{frontmatter}
\title{Titre}
\author{Auteur}
\ead{a@b}
\begin{abstract}
Le r\'esum\'e
\end{abstract}
\begin{keyword}
Les mots cl\'es
\MSC{AAA}
\end{keyword}
\end{frontmatter}

\section{Aaa}

Texte

\begin{figure}[htp]
\caption{L\'egende}
\end{figure}

\begin{table}[htp]
\caption{L\'egende}
\end{table}

\end{document}


Original answer

I'm not sure if elsarticle is meant to be used with languages different from English, because several English words are hard coded in it.

Here is a possibly not complete patch for making the class into using French for the tags.

\documentclass{elsarticle}
\usepackage[T1]{fontenc} 
\usepackage[english,francais]{babel}

\usepackage{regexpatch}

\makeatletter
\xpatchcmd{\abstract}{Abstract}{\abstractname}{}{}
\regexpatchcmd*{\@makecaption}{:}{\cA:}{}{}
\xpatchcmd*{\keyword}{Keywords}{Mots cl\'es}{}{}
\regexpatchcmd*{\keyword}{:}{\cA:}{}{}
\xpatchcmd{\printFirstPageNotes}
  {Email addresses}
  {Adresses email}
  {}{}
\xpatchcmd{\printFirstPageNotes}
  {Email address}
  {Adresse email}
  {}{}
\regexpatchcmd*{\printFirstPageNotes}{:}{\cA:}{}{}
\makeatother

\begin{document}
\begin{frontmatter}
\title{Titre}
\author{Auteur}
\ead{a@b}
\begin{abstract}
Le r\'esum\'e
\end{abstract}
\begin{keyword}
Les mots cl\'es
\MSC{AAA}
\end{keyword}
\end{frontmatter}

\section{Aaa}

Texte

\begin{figure}[htp]
\caption{L\'egende}
\end{figure}

\begin{table}[htp]
\caption{L\'egende}
\end{table}
\end{document}

enter image description here

The annoying warning will still show up. You can remove it by adding also

\usepackage{silence}

\WarningFilter{frenchb.ldf}{Figure}
1
  • Thanks to Pascal Quach for suggesting the edit.
    – egreg
    Commented May 16, 2020 at 16:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .