# No caption number for figures and tables

I want to make some of my figures just without a number.

Instead of Fig. 1: Caption. I want simply Caption.

I tried to do \caption*, but it doesn't work for me even after using the caption package upgrade.

Maybe there are another ways to do this?

You could use \captionsetup from the package caption that way:

\documentclass{article}

\usepackage{caption}

\usepackage{graphicx}

\begin{document}

\begin{figure}[h!]
\centering
\includegraphics[height=2cm]{figure}
\caption{Une figure.}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[height=2cm]{figure1}
\captionsetup{labelformat=empty}
\caption{Une figure.}
\end{figure}

\end{document}


This gives:

• I got it. I used caption2 instead of caption. Now it works. Thanks. Sep 3 '14 at 2:58
• With this setup, the next (numbered) figure will be numbered 3 rather than 2. To counteract this presumably unwanted effect, you could type \addtocounter{figure}{-1} before the start of the next figure environment.
– Mico
Sep 3 '14 at 7:54

You can also use \caption* when using the caption package which keeps only the caption title.

You may do something else what did not work, but this example works as desired:

\documentclass{article}
\usepackage{caption}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[ht]
\centering
\includegraphics{figure1}
\caption*{Caption.}
\end{figure}
\end{document}


I think the simplest way is to enter the caption not enclosed in the caption{} command.

MWE

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{Fig_test.png}
\caption{This with float name and number}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{Fig_test.png}\par
This with just the caption
\end{figure}
\end{document}


• I advise against this approach. Notice that the spacing is inconsistent. The one with the proper \caption macro has about a line worth of vertical space below the picture and the one below has much less than that. Mar 20 '19 at 11:06
• I guess a \vspace' could fix the problem. Apr 1 '19 at 13:56
• And now you need to guess the amount of \vspace as well :/ Apr 2 '19 at 23:18
• \vphantom{Figure 1} will match the vertical height of text "Figure 1" without needing to mess with \vspace`. See tex.stackexchange.com/questions/165499/… Jan 9 at 4:02