我正在尝试添加一些结果(图像)。我想在 PDF 的其他章节中引用这些图像,以便读者只需单击引用即可直接转到图像。我该怎么做?
答案1
以下是简单的操作方法:
- 使用
figure
环境,a\caption
和a\label
- 或者直接使用
\captionof{figure}{...}
标签
但在这两种情况下:不\label
,没有参考可能性。
\documentclass{article}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\listoffigures
In \cref{fig:nonfloat} you see a non-floating image and in \cref{fig:float} it's floating around and causes troubles (most times)
\begingroup
\includegraphics[scale=0.5]{ente}
\captionof{figure}[No float duck]{I hate float environments and that's why I don't use and recommend them } \label{fig:nonfloat}
\endgroup
\begin{figure}
\includegraphics[scale=0.5]{ente}
\caption[And the dreadful floating one]{I hate float environments and that's why I don't use and recommend them but just to demonstrate their usage }
\label{fig:float}
\end{figure}
\end{document}