Reputation: 10574
I am wondering if it is possible to give anchor an alias name.
for example:
## a very looooooooooooooooooooooooooong string
How can I refer to the long anchor with a short alais?
Upvotes: 1
Views: 1470
Reputation: 42467
You can revert back to raw HTML:
<h2 id="short-string">a very looooooooooooooooooooooooooong string</h2>
And then you can link to it elsewhere with:
Link to [a very looooooooooooooooooooooooooong string](#short-string).
Upvotes: 3
Reputation: 2410
Yes, it is possible, at least in the popular R markdown version (aka. Pandoc's markdown)
Not sure which flavour of markdown you are using but I did use this specific feature in several of my past R-markdown reports in the past.
Referring to the RStudio markdown cheatsheet v2.0:
# Header1 {#anchor}
then
Jump to [Header 1](#anchor)
Upvotes: 1