10

Is there a \urlstyle{tt} (or something else to that effect) for \href to make it the same font as \url links? I'm happy with any monospace font, as long as they both (\url and \href) show up the same.

10

You can use \nolinkurl inside the second argument of \href:

\href{http://mirror.ctan.org/foo/bar}{\nolinkurl{CTAN:foo/bar}}
| improve this answer | |
  • Or simply with \texttt{CTAN:foo/bar}/\ttfamily CTAN:foo/bar in the second part of \href. – Speravir Mar 25 '13 at 23:39
  • 1
    @HeikoOberdiek: Yes, that works but for a document with lots of \href, it is tedious to change them all (at least by hand). – Emanuel Berg Mar 25 '13 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.