How to Add Hyperlinks in LaTeX
The fix
Load \usepackage{hyperref} (last in your preamble). Use \url{https://example.com} for a bare clickable URL and \href{https://example.com}{link text} for a labelled link. hyperref also turns \ref, \cite, and table-of-contents entries into clickable links automatically.
Example
\usepackage{hyperref} % load LAST
\hypersetup{colorlinks=true, urlcolor=blue, linkcolor=black}
% ...
Visit \url{https://letx.app} or the
\href{https://letx.app/learn}{learn hub}.Frequently asked questions
Why should hyperref be loaded last?
hyperref redefines many commands, so loading it last (with a few known exceptions like cleveref) avoids clashes. If links break, check the load order first.
How do I colour links instead of boxing them?
Use \hypersetup{colorlinks=true} and set urlcolor, linkcolor, and citecolor. Without it, hyperref draws coloured boxes around links that do not print well.
Try the fix in LetX
Open the editor, paste your code, and compile in 1 second to see the error clear — free, in your browser.
Open LetX Free