我在SO(或其他任何地方)找不到任何答案。我的markdown文件中有一个嵌入式图像供doxygen使用,如下所示:
# 2. Example Markdown {#exMd}
This is a test to show an image
![imgDef]
[imgDef]: @ref SettingsValidationCollaborationDiagram.jpg "Diagram Caption"
## Some Other Section
This is a test to put a link to the image above. See [here](@ref imgDef)
请参阅下面的截图,了解我想要发生的事情:
如果我点击这里,那么它将带我到页面的一部分,原始图像可见。我无法找到一种制作锚点的方法,或者其他一些机制来创建我可以链接到图像附近的东西。
显然,现有代码会导致错误,但我不知道如何将图像链接插入到不仅仅将图像嵌入到该位置的图像中。
据我所知,这种方式无法与图像建立联系。这说有可能通过\anchor
命令(我在示例中的HTML注释中添加了一些额外的注释):
# 2. Example Markdown {#exMd}
This is a test to show an image
\anchor imgDef <!-- added line -->
![imgDef]
[imgDef]: SettingsValidationCollaborationDiagram.jpg "Diagram Caption" <!-- no need for the @ref here -->
## Some Other Section
This is a test to put a link to the image above. See [here](@ref imgDef)
基于评论的一小部分,来自文档:
\锚
此命令将一个不可见的命名锚放入可以使用\ ref命令引用的文档中。