如何链接到Multimarkdown中的命名锚点? [英] How to link to a named anchor in Multimarkdown?

查看:68
本文介绍了如何链接到Multimarkdown中的命名锚点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经提到过许多关于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] ##

这使您可以使用[MultiMarkdownOverview]专门引用本节,而不是其他名为Overview的节.这适用于atx或settext样式的标头.

This allows you to use [MultiMarkdownOverview] to refer to this section specifically, and not another section named Overview. This works with atx- or settext-style headers.

如果您已经使用与标头使用的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中的命名锚点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆