hyperref near the end of the preamble. Use \url to print a URL, \href for custom link text, and ordinary \label/\ref commands for clickable internal references.
Quick answer: add
\usepackage{hyperref} near the end of your preamble. Use \url{https://example.com} for a visible URL, \href{https://example.com}{link text} for descriptive text, and \autoref{sec:methods} for a clickable reference that includes its type.Which hyperlink command should you use?
Minimal Setup
Loadhyperref after most other packages so it can patch references correctly. Packages that extend its references may have their own order requirements; for example, load cleveref after hyperref.
If you want clickable links without colored text or border boxes, use this instead:
External Links
Use\url when you want to print the URL itself, and use \href when you want custom anchor text.
Internal Hyperlinks and Clickable References
Internal links usually come from labels and references: Ifhyperref is loaded, these references become clickable in the final PDF.
Custom anchors and jump links
Use\hypertarget to create a named destination and \hyperlink to jump to it. These commands are useful when the destination is not a numbered section, figure, table, or equation.
Prefer \label with \ref or \autoref when the destination already has a LaTeX number. Those references stay correct when sections or figures move.
Link appearance and PDF metadata
colorlinks=true colors the link text. Without it, many PDF viewers draw colored boxes around links. Use separate colors so readers can distinguish internal references, citations, and external URLs.
For print-oriented documents, hidelinks is often preferable because it keeps links active without changing the visible text style.
