Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
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. –  Ulrike Fischer Sep 22 '12 at 14:50
    
@UlrikeFischer: Good idea. –  Marco Daniel Sep 22 '12 at 14:55
add comment

1 Answer 1

up vote 6 down vote accepted

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.