This is a minimal example of the problem I am having:

\title{Sample Article Title}
This is just to show the problem in \S \ref{samplelabel}

This is the error I am getting:


 ! LaTeX Error: Command \url already defined.
           Or name \end... illegal, see p.192 of the manual.

 See the LaTeX manual or LaTeX Companion for explanation.
 Type  H <return>  for immediate help.

 l.102 \newcommand\url{\begingroup \Url}

It is working perfectly on another computer that doesn't have latex2html so I assume this explanation is correct. I am just having problems removing the latex2html along with it's conflicting url.sty. When I try

tlmgr remove latex2html

It says:

latex2html: package not present, cannot remove
tlmgr: no packages removed.

I should just say that I installed the most recent version of latex2html from here, and compiled it using the ./configure, make and make install

I am relatively new to LaTeX, such that I have never needed to remove a package and tlmgr doesn't seem to work. It would be excellent if someone could help me.


Try putting the copy of url.sty from /usr/local/texlive/2011/texmf-dist/tex/latex/url/url.sty. Does this work?

Actually, the directory /usr/local/texlive/2011/texmf/tex/latex/html/ is not in the standard TL distribution. If you installed latex2html manually, it might be installed from it...

  • Actually, after waiting for about an hour with no reply to the question, I thought a fresh installation of LaTeX would have been faster, especially that I was afraid latex2html might have infected other packages too, that I am not aware of now! So I did it and the problem was fixed! I guess your suggestion of replacing the <code>url.sty</code> would have been useful, but it didn't occur to me; I am a beginner! I will keep this in mind though. – makhlaghi May 5 '12 at 4:56

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.