Is there an easy way for Latex to ignore all special characters in a given phrase? For example, I had to copy several links which contained the symbol _ . I know that it is possible to put \ in front of every special character, to ignore it. But I was wondering if there is a command of the form

\ignore{^&%$###___} that outputs exactly '^&%$###___' in the pdf document?

Thank you.


To just insert the characters, use \verb|^&%$###___|. But this doesn't insert any line breaks.

To give the string proper line breaks for a url, \usepackage{url} and use \url{^&%$###___}.

To also make it a clickable link, \usepackage{hyperref} and again use \url{^&%$###___}.

  • 2
    if one do not need the features of hyperref it makes more sense to use \usepackage{url} – user2478 Feb 7 '12 at 21:52
  • So I guess the answer to the OP question is "no" (this isn't clearly stated in this answer). – kebs Dec 27 '18 at 14:34

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.