Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 831
danzig Avatar asked Sep 30 '22 02:09

danzig


People also ask

How do I write url in overleaf?

Links to a web address or email can added to a LaTeX file using the \url command to display the actual link or \href to use a hidden link and show a word/sentence instead. There are two commands in the example that generate a link in the final document: \href{http://www.overleaf.com}{Something Linky}

How do I make a link clickable in LaTeX?

How Do You Hyperlink in Latex? You can add a hyperlink into your LaTeX article using the command \usepackage{hyperref} and then including the command \href{YOUR URL}{TEXT FOR YOUR HYPERLINK}.


2 Answers

You can use \url

\usepackage{hyperref}
\url{http://stackoverflow.com/}
like image 308
zs2020 Avatar answered Oct 23 '22 04:10

zs2020


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

So

http://stack_overflow.com/~foo%20bar#link

would be

http://stack\_overflow.com/\~foo\%20bar\#link

like image 56
Gabe Avatar answered Oct 23 '22 04:10

Gabe