【发布时间】:2012-03-15 03:02:21
【问题描述】:
我目前正在用 Markdown 编写文档,我想引用我的文本中的图像。
this is my text, I want a reference to my image1 [here]. blablabla

我想做那个参考,因为在将我的 markdown 转换为 pdf 之后,图像会放在一两页之后,并且文档没有任何意义。
更新:
我在that post 中尝试过Ryan's answer,但无法正常工作。 显然是代码:
[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}:未检测到交叉引用。
然后,当我将其转换为 pdf 时,它显然没有链接到图像。有一个链接,但它没有链接到任何东西。
任何帮助将不胜感激!
【问题讨论】:
-
我已经对其进行了测试,但它不会产生自动引用。奇怪...
-
也许你应该编辑你的问题,包括你尝试了什么、你得到了什么和你想要什么(这样更容易帮助你)。
标签: latex markdown figure cross-reference pandoc