
Ich versuche, Folien zu erstellen
\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}
Diese Datei funktioniert, aber sie druckt „Abbildung“ über der Abbildung vor der Überschrift.
Antwort1
Ist es so etwas, das Sie erreichen möchten?
\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}
Antwort2
Es ist nicht notwendig, das Paket zu verwenden caption
, Sie können die Beamer-Vorlage für die Überschrift auch wie folgt anpassen:
\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}
Unabhängig vom Problem:
graphicx
Sie brauchen das Paket mit Beamer nichtbeamer hat keinen Floating-Mechanismus, das Hinzufügen von Floating-Spezifizierern wie [h!] ergibt keinen Sinn
\centering
eine Abbildung ist nicht erforderlich, der Beamer zentriert die Abbildungen standardmäßiges sollte
\textbf{....}
statt stehen\textbf ....
(es sei denn, Sie möchten nur einen Buchstaben fett formatieren)