我试图在同一个文件夹(子文件夹图片)中添加一张名为 iphone.png 的图片,但它会因错误而终止。
\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{hyperref}
\DeclareMathOperator{\Alt}{alt}
\begin{document}
\begin{figure}
\label{fig:iphoneCropped}
\begin{center}
\includegraphics[trim=0 5cm 0 5cm, clip]{../pictures/iphone.png}
\caption{Pictures of site on iphone}
\end{center}
\end{figure}
\autoref{fig:iphoneCropped}
Also it will refer to this picture as being subsubsection III-A1, instead of as figure.
\end{document}
答案1
该路径需要相对于运行 tex 的目录,并且\label
需要位于之后或之中,\caption
\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{hyperref}
\DeclareMathOperator{\Alt}{alt}
\begin{document}
\begin{figure}
\centering
\includegraphics[trim=0 5cm 0 5cm, clip]{pictures/iphone.png}
\caption{Pictures of site on iphone\label{fig:iphoneCropped}}
\end{figure}
\autoref{fig:iphoneCropped}
Also it will refer to this picture as being subsubsection III-A1, instead of as figure.
\end{document}