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
hyperref-setup.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
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:
hidden-link-style.tex
External Links
Use\url when you want to print the URL itself, and use \href when you want custom anchor text.
external-links.tex
Internal Hyperlinks and Clickable References
Internal links usually come from labels and references:internal-links.tex
hyperref 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.
custom-anchor.tex
\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.
hyperlink-options.tex
hidelinks is often preferable because it keeps links active without changing the visible text style.
Hyperlinks in the Table of Contents and Unnumbered Headings
For unnumbered sections, add a manual anchor before writing the label:phantomsection.tex
