I am using some big faculty LaTeX template for my thesis, so I do not really know, which packages I am supposed to mention here ...

Anyway, I am trying to write some urls.

I write them like


But the result in the PDF is


What can be wrong? How can I get rid of those marks?

  • 2
    Welcome to TeX.SX. For errors like these it is best to add a minimal working example (MWE) that illustrates them. This way people can compile it by themselves and also test their solutions. – Martin Scharrer May 8 '11 at 20:07

Does your template redefine \url such that its output should look like <https://tex.stackexchange.com/questions/ask> (including the angular brackets)? In this case the font encoding might be wrong. Try adding \usepackage[T1]{fontenc} to the preamble (or use \textless and \textgreater in the definition of \url).

See also Why do the less than symbol (<) and the greater than symbol (>) appear wrong as upside down exclamation (¡) or question mark (¿)?.

| improve this answer | |
  • thank you, \usepackage[T1]{fontenc} remove !? but it replaces them with <,> ... is there any way to have only url? or is it typographically wrong? – relaxxx May 9 '11 at 7:04
  • 1
    @relaxxx: As a default \url doesn't add anything around the text. So something in your document changed the default behaviour - perhaps by redefining the \UrlLeft and \UrlRight commands mentioned by egreg. That's the problem when using "big" templates. They can do a lot of unusual things. – Ulrike Fischer May 9 '11 at 8:28

You are probably writing <\url{http://tex.stackexchange.com/questions/ask}>; the standard setup for LaTeX fonts has ¡ and ¿ in place of < and >. In order to get typewriter < and > use \texttt{<} and \texttt{>}. Those characters in the normal font would be wrong anyway.

The documentation of the url package shows a trick for having those characters automatically: put


in the preamble of your document.

| improve this answer | |
  • I am not writing <...> i have just text \url{} text, but when I try copy !url? from my pdf, it copy it in <url> format – relaxxx May 9 '11 at 7:01

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.