I am writing a large Markdown document and would like to place a table of contents of sorts at the beginning that will provide links to various locations in the document. Ho
Experimenting, I found a solution using but an obvious solution is to place your own anchor point in the page wherever you like, thus:
before and
after the line you want to "link" to. Then a markdown link like:
[link text](#abcde)
anywhere in the document takes you there.
The solution inserts a "dummy" division just to add the
id
property, and this is potentially disruptive to the page structure, but the solution ought to be quite innocuous.
(PS: It might be OK to put the anchor in the line you wish to link to, as follows:
## Heading One
but this depends on how Markdown treats this. I note, for example, the Stack Overflow answer formatter is happy with this!)