![子图中缺少数字](https://linux22.com/image/414002/%E5%AD%90%E5%9B%BE%E4%B8%AD%E7%BC%BA%E5%B0%91%E6%95%B0%E5%AD%97.png)
我使用了其中任何一个,都出现同样的错误。无法检查我的错误在哪里。
\documentclass[12pt,oneside]{book}
\usepackage{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure}[h]
\centering
\begin{subfigure}{\linewidth}
\includegraphics[scale=0.4]{example-image}
\caption{test1}
\end{subfigure}
% \hfil
\begin{subfigure}{\linewidth}
\includegraphics[scale=0.4]{example-image}
\caption{test2}
\end{subfigure}
\caption{Testing}
\label{fig:Features}
\end{figure}
\结束{文档}
答案1
您似乎正在使用subcaption
包的语法,所以
\documentclass[12pt,oneside]{book}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[h]
\centering
\begin{subfigure}{\linewidth}
\includegraphics[scale=0.4]{example-image}
\caption{test1}
\end{subfigure}
\begin{subfigure}{\linewidth}
\includegraphics[scale=0.4]{example-image}
\caption{test2}
\end{subfigure}
\caption{Testing}
\label{fig:Features}
\end{figure}
\end{document}