como posso remover o rótulo da figura

como posso remover o rótulo da figura

Estou tentando fazer slides

\documentclass[11pt] {beamer}
\usepackage{caption}
\usepackage{graphicx}

\begin{document}

\section{my photos}
\begin{frame}
\footnotesize\textbf  Is this the same as previous figure? 
\begin{figure}[h!]
\caption{This is amazing photo}
\centering
\includegraphics[width=0.4\textwidth]{photo1.jpg}
\end{figure}
\end{frame}
\end{document}

Este arquivo funciona, mas imprime "Figura" no topo da figura antes da legenda.

Responder1

É algo assim que você está tentando obter?

\documentclass{beamer}
\usepackage[labelformat=empty]{caption} 

\begin{document}

\begin{frame}
\frametitle{my photos}
\footnotesize\textbf Is this the same as previous figure?
\begin{figure}[h!]
\caption{This is an amazing photo}
\centering
\includegraphics[width=0.4\textwidth]{TasmanianDevil.jpg}
\end{figure}
\end{frame}

\end{document} 

insira a descrição da imagem aqui

Responder2

Não é necessário utilizar o captionpacote, você pode modificar o modelo do beamer para a legenda assim:

\documentclass[11pt]{beamer}

\setbeamertemplate{caption}{%
  \raggedright
  \insertcaption\par
}

\begin{document}

\section{my photos}
\begin{frame}
\footnotesize\textbf{Is this the same as previous figure?} 
\begin{figure}
\caption{This is amazing photo}
%\centering
\includegraphics[width=0.4\textwidth]{example-image-duck}
\end{figure}
\end{frame}
\end{document}

insira a descrição da imagem aqui

Não relacionado ao problema:

  • você não precisa do graphicxpacote com beamer

  • O beamer não possui um mecanismo flutuante, adicionar um especificador flutuante como [h!] não faz sentido

  • \centeringuma figura é desnecessária, o projetor centraliza as figuras por padrão

  • deveria ser \textbf{....}em vez de \textbf ....(a menos que você pretenda deixar apenas uma letra em negrito)

informação relacionada