问题描述
我已经提到过许多关于MultiMarkdown对内部链接/命名锚点的支持,但是我找不到一个具体如何做的例子.
I have come across a number of mentions of MultiMarkdown's support for internal links / named anchors but I am unable to find a single example of how to actually do it.
那么,表示命名锚的语法是什么,与链接到任何其他URL相同的语法是什么(仅使用#foo而不是http://....
)?
So, what is the syntax for denoting the named anchor, and what is the syntax for linking to it the same as linking to any other URLs (only using #foo instead of http://....
)?
推荐答案
来自 Multimarkdown用户指南(感谢Twitter上的@MultiMarkdown指出)
Taken from the Multimarkdown Users Guide (thanks to @MultiMarkdown on Twitter for pointing it out)
[Some Text][]
将链接到名为"Some Text"的标题.
例如
[Some Text][]
will link to a header named "Some Text"
e.g.
### Some Text ###
您选择的可选标签可帮助消除多个标题具有相同标题的情况的歧义:
An optional label of your choosing to help disambiguate cases where multiple headers have the same title:
### Overview [MultiMarkdownOverview] ##
如果您已经使用与标头使用的ID相同的ID定义了锚,则定义的锚优先.
If you have already defined an anchor using the same id that is used by a header, then the defined anchor takes precedence.
除了文档中的标题外,您还可以提供图像和表格的标签,这些标签也可以用于交叉引用.
In addition to headers within the document, you can provide labels for images and tables which can then be used for cross-references as well.
这篇关于如何链接到Multimarkdown中的命名锚点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!