TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I redefine \verb!! to translate into \url{}? I have to do this to fool Emacs highlighting so it thinks I have \verb, in the background I like \url{} wrapping capability.

share|improve this question
\let\verb\url?! – clemens Mar 21 '12 at 15:45
Am I correct in thinking this is only so your editor (Emacs) is happy in some way, or is this actually about the LaTeX output you get? – Joseph Wright Mar 21 '12 at 15:49
that worked. thank you. – user423805 Mar 21 '12 at 15:52
I could not find a way to make Emacs highlight \url the way \verb is highlighted, so I fixed it on the Latex side. It is a hack, big time, but it works now. – user423805 Mar 21 '12 at 15:53
I think that if you asked How to get Emacs properly highlight \url, you would get a sufficient answer. This is, in my opinion, a typical example of the XY problem. – yo' Mar 21 '12 at 16:54

Even if you apparently asked the wrong question (see tohecz's comment) it's solution is


See for example this question and its answers for an explanation of \let.

share|improve this answer

Your Answer


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.