Document Classespaper class problem with French/babel

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

paper class problem with French/babel

Post by Cham »

I know that the paper class is very old, and its documentation is German only (I didn't found an English version). Yet, I would like to set up a French document with this class, and I'm encountering a problem with the figure's label. Here's a MWE showing the issue :

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[11pt,twoside]{paper}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot]{geometry}
 
\begin{document}
 
	\begin{figure}
		\centering
		\includegraphics[height=4cm]{example-image-a}
		\caption{Some caption text.}
	\end{figure}
 
\end{document}
There is no space before the ":" (just after the caption's number. Is it possible to change this to a French like "--" with a space on both sides?

Weirdly, this class is the only one giving me an hard time in setting a proper French version of its captions, even using some options to the caption/subfig package :

Code: Select all

\usepackage{subfig}
\captionsetup{figurename=Figure,margin=1in,format=hang,font=small,format=plain,labelfont={bf,up,sf},textfont={up}}
\captionsetup[subfigure]{margin=0cm,font=small,format=plain,labelfont={bf,up},textfont={up}}
\captionsetup[table]{name=Table,labelfont={bf,up}}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

paper class problem with French/babel

Post by Stefan Kottwitz »

Hi Cham,

simply add

\captionsetup{labelsep=endash}

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

paper class problem with French/babel

Post by Cham »

Nice one, thanks Stefan!
Post Reply