How to Write Urls in Latex? [Closed]

How do you write a URL in Latex?

The subscripts and everything else make the font look very strange when it compiles.

1

You can use \url

\usepackage{hyperref}
\url{
3

You just need to escape characters that have special meaning: # $ % & ~ _ ^ \ { }

So

would be

4

Here is all the information you need in order to format clickable hyperlinks in LaTeX:

Essentially, you use the hyperref package and use the \url or \href tag depending on what you're trying to achieve.

A minimalist implementation of the \url macro that uses only Tex primitives:

\def\url#1{\expandafter\string\csname #1\endcsname}

This url absolutely won't break over lines, though; the hypperef package is better for that.

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest