0

When leaving the caption empty, I get something like "Figure 11-". How do I remove all the dashes "-" from empty captions.

\documentclass[a4paper,11pt]{book}
\usepackage[francais]{babel}
\usepackage{chngcntr}  % continuous figure number
\usepackage{tikz}
\usepackage{float}
\counterwithout{figure}{chapter}

\begin{document}
{


\begin{figure}[H]\centering
\begin{tikzpicture}
\coordinate (A) at (3,9);
\coordinate (B) at (2,6);
\draw (A)--(B);
\end{tikzpicture}
\caption{}
\end{figure}

\end{document}
  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Phelype Oleinik Nov 7 '18 at 15:29
  • I guess the babel package adds "-" instead of ":" – Any Nov 7 '18 at 15:38
  • 2
    Just load the caption package. – Bernard Nov 7 '18 at 15:53
1

Use the caption package and add this to the preamble:

\captionsetup[figure]{name={Fig.},labelsep=space}
| improve this answer | |
  • Does it interfere with the float package? – Any Nov 7 '18 at 15:58
  • Just like Bernhard has commented above: \usepackage{caption} is sufficient to solve this problem. No need for the \captionsetup[figure]{...} line. – user2574 Nov 7 '18 at 22:01
  • @Any The caption package is compatible to the float package. – user2574 Nov 7 '18 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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