I am trying to convert markdown to latex using a self made script. One of the issues I am running against are hyperlinks.
Within markdown there are numerous ways to place links (external hyperlinks), like this:
My favorite search engine is Duck Duck Go.
or as a quick link: https://www.markdownguide.org.
The two options above I have no problem with converting to latex (other than a package clash between hyperref and url, but I'll fix that).
My favorite search engine is \href{https://duckduckgo.com}{Duck Duck Go}.
or as a quick link: \url{https://www.markdownguide.org}.
The issues start with markdown's referenced links though, which look like this:
In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a [hobbit-hole][1], and that means comfort.
the tag [1] is then later in the page/document referred as:
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle "Hobbit lifestyles"
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle (Hobbit lifestyles)
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> "Hobbit lifestyles"
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> (Hobbit lifestyles)
which will result in the references not showing and the [hobbit-hole] becoming a hyperlink.
Is a similar logic for referenced links available in latex, or in the hyperref package?

biblatex, so I have removed the tag. If there is abiblatexconnection, please add the tag and make it more explicit in the question why it is relevant. – moewe Jan 29 '22 at 08:16s answer best matched my use case. This is a simpler way to add references links. Ulrichs approach seems to work as well but it makes the document a lot more difficult. – RKoornneef Feb 18 '22 at 06:09