我正在使用Markdown编写文档,希望在文本中引用一张图片。
this is my text, I want a reference to my image1 [here]. blablabla
![image1](img/image1.png)
我希望能够引用,因为将我的Markdown转换为PDF后,图像会在一两页后放置,文档就没有意义了。
更新:
我尝试了Ryan的答案在那篇文章中,但我无法使它工作。 显然代码:
[image]: image.png "Image Title"
![Alt text][image]
A reference to the [image](#image).
应该产生:
\begin{figure}[htbp]
\centering
\includegraphics[keepaspectratio,width=\textwidth,height=0.75\textheight]{i mage.png}
\caption{Alt text}
\label{image}
\end{figure}
A reference to the image (\autoref{image}).
相反,我得到:
\begin{figure}[htbp]
\centering
\includegraphics{image.png}
\caption{Alt text}
\end{figure}
A reference to the \href{\#image}{image}.
我注意到两个问题:
\label{image}
没有出现:没有创建参考。(\autoref{image})
变成了\href{\#image}{image}
:没有检测到交叉引用。
非常感谢您的帮助!!