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.

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
1  
\let\verb\url?! –  cgnieder 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
8  
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. –  tohecz Mar 21 '12 at 16:54

1 Answer 1

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

\let\verb\url

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

share|improve this answer

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.