19

This question already has an answer here:

\url{...} produces a rather wide monospace font. It often does not fit into text width.

If I wish to make \url{...} another font (such as maybe the same font as the text font), how to do it?

marked as duplicate by Mico, Werner, egreg fonts Aug 14 '15 at 19:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

29

\url comes from package url (loaded by hyperref). \urlstyle configures the font. The same font:

\urlstyle{same}

This means, no special font is set and the current font is used for the URL.

Other pre-defined styles:

  • \urlstyle{rm}: The font \rmfamily is used.
  • \urlstyle{sf}: The font \sffamily is used.
  • \urlstyle{tt}: This is the default: \ttfamily.

See also the package documentation.

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