如何引用一个图形?

如何引用一个图形?

我正在尝试添加一些结果(图像)。我想在 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} 

在此处输入图片描述

相关内容