
· Vikram Aruchamy · LaTeX
How to Write URLs and Hyperlinks in LaTeX (url, hyperref, xurl)
To write a URL in LaTeX, load hyperref and use \url{https://example.com} for a clickable link in typewriter font, or \href{https://example.com}{link text} to show your own text. Characters like _, % and # need no escaping inside \url. For long URLs that overflow the margin, add \usepackage{xurl} to allow breaks anywhere.