3

I've tried to accomplish this for some time with the caption package, but with no result. What I want to do is change the following:

Figure 1: text

into

Figure-1: text

I.e. replace the space with a dash.

1
  • Is the "dash" symbol supposed to be a "simple" dash, i.e., a hyphen character, or an "en-dash"?
    – Mico
    Jun 13, 2012 at 15:29

1 Answer 1

5

You find it in section 4 of the manual: you have to define a new label format style. I added only the relevant setup, you can set the other keys as usual.

\documentclass{article}

\usepackage{graphicx}
\usepackage{caption}
\DeclareCaptionLabelFormat{dash}{#1--#2}
\captionsetup[figure]{labelformat=dash}

\begin{document}
\begin{figure}
\centering
\includegraphics[width=5cm]{example-figure-a}
\caption{abc}
\end{figure}
\end{document}

enter image description here

0

You must log in to answer this question.

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