我使用下面的代码按顺序将三张图片表示为子部分。但是,标题中没有显示图片编号。谢谢。
\begin{figure}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{Fig1}
\caption{Social Networks}
\label{fig:Social Networks}
\end{subfigure}
~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{Fig2}
\caption{Energy Networks}
\label{fig:Energy Networks}
\end{subfigure}
~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{Fig3}
\caption{Internet}
\label{fig:Internet}
\end{subfigure}
\caption{Examples of graph data modelling}
\label{fig:graph modelling}
\end{figure}
答案1
在序言中你需要添加
\setbeamertemplate{caption}[numbered]
你将获得以下结果:
\documentclass[demo]{beamer}
\setbeamertemplate{caption}[numbered]% <-- added, for other option see beamer manual, page 124
\usepackage{subcaption}
\begin{document}
\begin{frame}
\begin{figure}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{Fig1}
\caption{Social Networks}
\label{fig:Social Networks}
\end{subfigure}
~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{Fig2}
\caption{Energy Networks}
\label{fig:Energy Networks}
\end{subfigure}
~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{Fig3}
\caption{Internet}
\label{fig:Internet}
\end{subfigure}
\caption{Examples of graph data modelling}
\label{fig:graph modelling}
\end{figure}
\end{frame}
See images \ref{fig:Social Networks}, \ref{fig:Energy Networks} and \ref{fig:Internet} in figure \ref{fig:graph modelling}.
\end{document}
笔记:您的问题与问题相关/重复beamer 演示图没有编号。