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'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.

share|improve this question
    
Is the "dash" symbol supposed to be a "simple" dash, i.e., a hyphen character, or an "en-dash"? –  Mico Jun 13 '12 at 15:29

1 Answer 1

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

share|improve this answer

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.