Skip to content

Links and URLs in LaTeX

Load hyperref, then write \url{https://...} to show an address or \href{https://...}{link text} to link words; both become clickable links in the PDF.

\url and \href

\url{...} prints an address in a form that can contain _, %, # and ~ without escaping, and links it. \href{address}{text} links any text you choose.

In the PDF from Scissor LaTeX both are links you can click. On the page they look like the surrounding text: links are not coloured or boxed.

\href takes any kind of address, so mailto: gives an e-mail link.

\hyperref[label]{text} links your own text to a label, for example a section. To print the number of the section as a link, \ref is enough; \autoref adds the word "Section" (see Labels and cross-references).

Commands and settings

CommandIn Scissor LaTeXNotes
\url{address}WorksShown as typed, linked.
\href{address}{text}Workshttp, https, mailto and other schemes.
\hyperref[label]{text}WorksLinks to the label.
\path{...}WorksShown in monospace, not linked.
\nolinkurl{...}PartlyReported as an unknown command; the address is kept as plain text.
\hypersetup{...}Left outColours, borders and PDF metadata settings are ignored.
\hyperlink{name}{text}, \hypertarget{name}{text}PartlyThe text is kept; no link is made.
\texorpdfstring{tex}{pdf}WorksThe first argument is used.

Long addresses

A long \url can break at / and similar characters at the end of a line, so it does not run into the margin. Breaking inside a word does not happen; if an address is still too long, shorten it, or use \href with a short text.

What differs from a TeX installation

For the package, see hyperref. The full manuals are on CTAN: hyperref and url.

Questions and answers

How do I insert a hyperlink in LaTeX?

Load hyperref and write \href{https://example.com}{link text}. For an address shown as it is, write \url{https://example.com}.

How do I make links blue in LaTeX?

In a TeX installation, \hypersetup{colorlinks=true, urlcolor=blue} does it. Scissor LaTeX ignores those settings in ordinary documents, so links look like normal text there, but they are still clickable in the PDF.

Do I need to escape underscores in a URL?

Not inside \url{...} or the first argument of \href. Both accept _, %, # and ~ as they are.

Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-06.