[Tex/LaTex] tilde in hyperref url with \usepackage[T1]{fontenc}

symbolstilde

By default, LaTeX typesets tildes "too high", but the hyperref package ordinarily corrects this behaviour for URLs (it vertically centers tildes, as expected). However \usepackage[T1]{fontenc} seems to break this, and the tilde is "too high" again.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\begin{document}
\url{http://lyle.smu.edu/~tspell/jaws}
\end{document}

any idea how to fix this?

Best Answer

If you

\usepackage{lmodern}

before

\usepackage[T1]{fontenc}

It will work as you expect. (see Correctly typesetting a tilde)

Related Question