6

I have a problem override the default formatting of float captions when using babel’s French option. When babel’s francais setting is chosen, captions are formatted with the label (“Figure X”) in small caps. I'm trying to override that with the caption package, but to no avail. The following minimal example:

\documentclass{article}
\usepackage[labelfont=it]{caption}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\begin{document}
\begin{figure}\caption{xxxxx}\end{figure}
\end{document}

gives

enter image description here

where only the digit is italicized. If I comment out the babel line, it works correctly:

enter image description here

caption’s doc says that it should be loaded after babel to override it, but here it does not seem to be the case. Anyone knows how to work around this issue?

2
  • 2
    I suggest that you write the author of frenchb. daniel.flipo.free.fr/frenchb. It is imho a bad idea to put formatting instructions inside fix names like \figurename. Sep 22, 2012 at 14:50
  • @UlrikeFischer: Good idea. Sep 22, 2012 at 14:55

2 Answers 2

8

The package babel with the language francais loads the file frenchb.ldf with the following defintion:

\def\figurename{{\scshape Figure}}%

The combination of \itshape\scshape is defined with the current font so you will get the odd result.

I can't understand why babel influences the format.

However you have the following possibilities to solve the issue:

1. Usage of the package caption

You can redefine the name via:

\captionsetup[figure]{name=Figure}

2. Usage of the package babel

\addto\captionsfrancais{%
   \def\figurename{Figure}%
}

Here a complete MWE:

\documentclass{article}
\usepackage[francais]{babel}

\addto\captionsfrancais{%
   \def\figurename{Figure}%
}
\usepackage[T1]{fontenc}
\usepackage[labelfont=it,]{caption}
%\captionsetup[figure]{name=Figure}

\begin{document}
\begin{figure}\caption{xxxxx}\end{figure}


\end{document}
5

Just had the same problem and found this solution in the babel manual:

\usepackage[francais]{babel}
\frenchbsetup{SmallCapsFigTabCaptions=false}
1
  • +1 By the "babel manual" you mean frenchb.pdf in this case. Aug 18, 2016 at 15:15

You must log in to answer this question.

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