Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

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{^&%$###___}.

share|improve this answer
2  
if one do not need the features of hyperref it makes more sense to use \usepackage{url} –  Herbert Feb 7 '12 at 21:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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