Pandoc behaves as if reference links have been defined for each heading. So, to link to a heading
# Heading identifiers in HTML
you can simply write
[Heading identifiers in HTML]
or
[Heading identifiers in HTML][]
or
[the section on heading identifiers][heading identifiers in
HTML]
instead of giving the identifier explicitly:
[Heading identifiers in HTML](#heading-identifiers-in-html)
If there are multiple headings with identical text, the corresponding reference will link to the first one only, and you will need to use explicit links to link to the others, as described above.
Like regular reference links, these references are case-insensitive.
Explicit link reference definitions always take priority over implicit heading references. So, in the following example, the link will point to bar
, not to #foo
:
# Foo
[foo]: bar
See [foo]