cel*_*orb 12 label latex caption figure
在我的TeX文件中,我有以下代码:
\begin{figure}[H]
\begin{center}
\includegraphics[width=5in]{screens/main.png}
\caption{\label{fig:MainScreen} Screenshot of the main screen of TADA.}
\end{center}
\end{figure}
Run Code Online (Sandbox Code Playgroud)
但是,当我在我的文档中参考前面的图时:
...in Figure \ref{fig:MainScreen}.
Run Code Online (Sandbox Code Playgroud)
...如果我点击预览(Mac)中的参考,它会将我带到\label命令所在的位置(低于图中的实际图像).也就是说,文档滚动到标题位于页面顶部的位置,如果我试图查看图形本身,这有点令人讨厌.
我的问题是,我可以让LaTeX创建对图形顶部的引用,同时保持\caption命令在底部吗?出于文体目的,我必须将标题保留在图中.
我唯一的想法是将\label命令移到命令之前\includegraphics,但显然\caption必须提前\label引用才能正常工作.