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.

Possible Duplicate:
Remove colon in the caption of a figure if the caption is empty

I want to add a picture with caption Figure 1, but without any additional text. I want the autonumbering.

If I do this

\begin{figure}[h!]
  \caption{}
  \includegraphics{graphics}
\end{figure}

I got Figure 1: in the result, which looks ugly.

I want just Figure 1 in the text. I will explain elsewhere what the figure means. Can I do that?

share|improve this question
add comment

marked as duplicate by Werner, Count Zero, Gonzalo Medina, cmhughes, egreg Jun 11 '12 at 20:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 1 down vote accepted

Package caption does this automatically.

\documentclass{article}
\pagestyle{empty}
\usepackage{caption}
\begin{document}

\begin{figure}[h]
  \centering
  \caption{}
\end{figure}

\begin{figure}[h]
  \centering
  \caption{Test}
\end{figure}

enter image description here

share|improve this answer
    
Thanks, that's it –  Karel Bílek Jun 11 '12 at 20:26
add comment

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