How can I have in a figure caption Figure 1: caption instead of Figure 1 - caption ?
I tried this
\usepackage[labelsep=endash]{caption}
but didnt work.
another simple question why we should use \label{} after every \caption{} ?
EDIT: here is the code
\documentclass{article}
\usepackage[labelsep=endash]{caption}
\usepackage{graphicx}
\begin{document}
\begin{figure}[t]
\begin{center}
\includegraphics[scale=.25]{image.png}
\end{center}
\caption{titre}
\label{fig:img}
\end{figure}
\end{document}
\labelneeds the current counter which has been increased -- the counter is increased by\caption(using\refstepcounterinternally), so\labelmust come after\caption: By the way::is the default – Oct 14 '15 at 15:13\labelafter every\caption": The\labelhas to go after\caption(see Why does an environment's\labelhave to appear after the\caption?), but you don't need a\labelafter every\caption; only those that you want to refer to in another part of the document. – Werner Oct 14 '15 at 15:16:is the default why do i have the dash i havent modify anything or load any package that could modify it. weird ? – noob Oct 14 '15 at 15:19labelsep=endash, that's it. You are requesting an en-dash, with that option. – egreg Oct 14 '15 at 15:25labelsep=colon– noob Oct 14 '15 at 15:28babel-frenchsets it that way. – Bernard Oct 14 '15 at 15:59