问题描述
我正在尝试将几个子图对齐。 2个数字工作正常。当尝试包含以下错误消息的第三个子图时,会出现以下错误消息:扫描使用 @subfloat 时文件已结束。 \include{doc}
此 tex 文档包含在带有包的主文件中:
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{subcaption}
%%%%%%new doc
\begin{figure}[h!]
\centering
\subfigure[a]{\includegraphics[width=0.1\textwidth]{logos/Symbol_One_flow_path}}
\subfigure[b]{\includegraphics[width=0.1\textwidth]{logos/1920px-Symbol_Two_flow_paths}}
\subfigure[c]{\includegraphics[width=0.1\textwidth]{logos/Symbol_Two_flow_paths_(diagonally)} \subfigure[d]{\includegraphics[width=0.3\textwidth{logos/Symbol_Two_flow_paths_with_connection}
\subfigure[e]{\includegraphics[width=0.3\textwidth]{logos/graph}
\end{figure}
解决方法
此问题可能是由于图 c、d 和 e 末尾缺少 }
。
这可以解释为什么你只有数字 a 和 b。
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{subcaption}
\begin{figure}[h!]
\centering
\subfigure[a]{\includegraphics[width=0.1\textwidth]{Logos/Symbol_One_flow_path}}
\subfigure[b]{\includegraphics[width=0.1\textwidth]{Logos/1920px-Symbol_Two_flow_paths}}
\subfigure[c]{\includegraphics[width=0.1\textwidth]{Logos/Symbol_Two_flow_paths_(diagonally)}} %one } was missing here !
\subfigure[d]{\includegraphics[width=0.3\textwidth{Logos/Symbol_Two_flow_paths_with_connection}} % here also
\subfigure[e]{\includegraphics[width=0.3\textwidth]{Logos/graph}} %and here
\end{figure}