Using the package hyperref, I can use \url to produce clickable URLs. But in the viewers I have their boundaries are very badly set. Example:
Hence, I prefer to use \href{}{}, which works most of the time. But in the examples in this picture it crashes. This is a near minimal crashing example:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
%\url{https://en.m.wikipedia.org/wiki/Spirit_way}
\href{https://en.m.wikipedia.org/wiki/Spirit_way}{https://en.m.wikipedia.org/wiki/Spirit_way}
\end{document}
What should I change?
Best Answer
You're mis-using the
\href
macro: The second argument should be a human-readable string, not some URL which may contain characters -- such as_
("underscore") -- that are special to TeX.If you insist on showing the full URL, just use the
\url
macro, not the\href
macro.