14

I am trying to put a figure with a subtitle but without the name "figure".

For example:

triangle

'This is a triangle'

and not put the name "Figure":

enter image description here

'Figure: This is a triangle'

I tried:

1.

\begin{figure}
\begin{center}
\includegraphics[scale=*]{fig.jpg}
\caption{*}
\end{center}
\end{figure}

2.

\begin{frame}
\includegraphics[scale=*]{fig.jpg}
\caption{*}
\end{frame}

And neither have worked.

Werner
  • 603,163

3 Answers3

11

Use the \caption* command from caption package.

\documentclass{article}

\usepackage{graphicx}

\usepackage{caption}

\begin{document}

\begin{figure}
  \centering
  \includegraphics{fig.jpg}
  \caption{This is a triangle.}
  \label{fig:tr1}
\end{figure}


\begin{figure}
  \centering
  \includegraphics{fig.jpg}
  \caption*{This is also a triangle.}
  \label{fig:tr2}
\end{figure}

\end{document}

enter image description here

enter image description here

Masroor
  • 17,842
8

Within a presentation (like beamer) there is very little need to have enumerated captions for images. Regardless, there is no need to always use a (floating) figure environment for including graphics, nor is it necessary to use \caption inside figure.

I would suggest merely using the center environment to center the object and add a piece of text below it to act like the caption:

enter image description here

\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/q/58087/5764
\usepackage{graphicx}
\begin{document}

\begin{frame}
  This is text.

  \begin{center}
    \includegraphics[width=.5\linewidth]{example-image}

    This is a rectangle
  \end{center}

  Here is some more text.
\end{frame}

\end{document}
Werner
  • 603,163
3

Another possibility is to customise the caption itself. Like this you can keep your syntax.

\documentclass{beamer}
\usepackage{graphicx}

\setbeamertemplate{caption}{\insertcaption}

\begin{document}

    \begin{frame}
        This is text.

        \begin{figure}
            \includegraphics[width=.5\linewidth]{example-image}
            \caption{This is a rectangle}
        \end{figure}

        Here is some more text.
    \end{frame}

\end{document}

enter image description here