Skip to main content
To create clickable links in a LaTeX PDF, load 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.

Minimal Setup

Load hyperref 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: Use \url when you want to print the URL itself, and use \href when you want custom anchor text. Internal links usually come from labels and references: If hyperref is loaded, these references become clickable in the final PDF. 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. 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. For unnumbered sections, add a manual anchor before writing the label: This ensures the PDF link points to the right place.

Common hyperref problems