当我添加图片时,所有引用都变为未定义

当我添加图片时,所有引用都变为未定义

我正在使用 Latex 为我的论文项目编写文档,但是当我添加图像(这不是我放入文档中的第一张图像)并重新编译时,Latex 会抛出错误,告诉我文档中的所有引用均未定义。我将范围缩小到导致文档编译失败的这幅特定图像,但我不明白为什么会这样,因为我的所有其他图像都没有问题。我用来将图像添加到文档的代码如下:

\subsubsection{Small 15x15 Cell Maze}
This small 15x15 cell maze is the first of the three new mazes which will be implemented in this project to evaluate the effectiveness of the new human-like maze solving algorithm. Again, this is a simply connected maze meaning that it can be solved using the Hand on the Wall technique.


\begin{figure}[h]
    \centering
    \includegraphics[scale=.5]{images/Small15x15.png}
    \caption{Image of a small randomly generated maze found at www.mazegenerator.net \citep{mazeGen}}
    \label{fig:15x15Maze}
\end{figure}

\subsubsection{Medium 25x25 Cell Maze}
This medium 25x25 cell maze is the second of the three new mazes. It was generated using a maze generating and solving program Daedalus v3.3. This maze presents a more complicated structure than the previous as it is larger and is a multiply-connected maze much like the Chevening House maze. Figure \ref{fig:25x25Maze}  shows the 2D representation of the maze.

\begin{figure}[h]
    \centering
    \includegraphics[scale=0.5]{images/new25x25maze.png}
    \caption{Image of the medium 25x25 cell maze. Generated using Daedalus v3.3}
    \label{fig:25x25Maze}
\end{figure}

我添加的最后一张图片导致文档无法编译,导致我的引文无法加载。但如果我删除该图片,文档就可以编译。如果有人能帮忙,我将不胜感激

答案1

解答:在文档中研究了一段时间后,我发现图像不能正确地从位图转换为 PNG,因此再次将图像导出为 PNG 然后将其添加到文档中就解决了这个问题。

相关内容