我想在图片下方写上标题,但不幸的是,当我编译文本时,标题没有出现。图片还可以,但我想在图片下方看到类似“图 1:bla bla”的内容。我在下面附上了一个 MWE
\documentclass{beamer}
\usepackage{caption}
\usepackage{subcaption}
%\usepackage{floatrow}
\newtheorem{proposition}{Proposition}
\renewcommand{\baselinestretch}{1.2}
\small\normalsize
\newcommand{\beginbackup}{
\newcounter{framenumbervorappendix}
\setcounter{framenumbervorappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
\addtocounter{framenumbervorappendix}{-\value{framenumber}}
\addtocounter{framenumber}{\value{framenumbervorappendix}}
}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{mini frames}{}
\setbeamertemplate{itemize item}[ball]
\setbeamertemplate{itemize subitem}[ball]
\setbeamercovered{invisible}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Write Title Here}
\author{Author name}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Title here}
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{Fig/myfigure}
\caption{Write here figure caption}
\label{fig1}
\end{figure}
\end{frame}
\end{document}
答案1
添加到您的文档序言中\setbeamertemplate{caption}[numbered]
:
\documentclass[demo]{beamer} % in real document remove option "demo"
\setbeamertemplate{caption}[numbered] % NEW
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{mini frames}{}
\setbeamertemplate{itemize item}[ball]
\setbeamertemplate{itemize subitem}[ball]
\setbeamercovered{invisible}
\usepackage{subcaption}
%\usepackage{floatrow}
\newtheorem{proposition}{Proposition}
\renewcommand{\baselinestretch}{1.2}
\small\normalsize
\newcommand{\beginbackup}{
\newcounter{framenumbervorappendix}
\setcounter{framenumbervorappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
\addtocounter{framenumbervorappendix}{-\value{framenumber}}
\addtocounter{framenumber}{\value{framenumbervorappendix}}
}
\title{Write Title Here}
\author{Author name}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Title here}
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{Fig/myfigure}
\caption{Write here figure caption}
\label{fig1}
\end{figure}
\end{frame}
\end{document}