URLs with special characters in Footnotes

kb
kbecker87
Posts: 14
Joined: Tue Jun 07, 2016 12:47 pm
Platform: Mac

Wed Apr 28, 2021 8:25 pm Post

Hi, I often need to link to URLs with special characters like

Code: Select all

https://en.wikipedia.org/wiki/List_of_online_music_databases
http://millionsongdataset.com/sites/default/files/AdditionalFiles/unique_artists.txt


in Footnotes.

I always remove the link, otherwise LaTeX would make a construct like this:

Code: Select all

\footnote{\href{https://en.wikipedia.org/wiki/List_of_online_music_databases}{ https:\slash \slash en.wikipedia.org\slash wiki\slash List\emph{of}online\emph{music}databases}\footnote{\href{https://en.wikipedia.org/wiki/List_of_online_music_databases}{https:\slash \slash en.wikipedia.org\slash wiki\slash List\_of\_online\_music\_databases}}


Without the URL being a link it‘s slightly better (without the double footnote) but the underscores are still not escaped:

Code: Select all

\footnote{https:\slash \slash en.wikipedia.org\slash wiki\slash List\emph{of}online\emph{music}databases}


What I do want is:

Code: Select all

\footnote{https://en.wikipedia.org/wiki/List\_of\_online\_music\_databases}


I compile MMD to LaTeX.

How do I archive this or what workaround is there for this kind of requirement? Thanks!