1

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

\documentclass[iop]{emulateapj}
\usepackage{verbatim}
\usepackage[colorlinks,urlcolor=blue,citecolor=blue,linkcolor=blue]{hyperref}
\begin{document}
\title{Sample Article Title}
\section{Sample}\label{samplelabel}
This is just to show the problem in \S \ref{samplelabel}
\end{document}

This is the error I am getting:

 (/usr/local/texlive/2011/texmf/tex/latex/html/url.sty

 ! 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.

makhlaghi
  • 1,882

1 Answers1

2

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...

Boris
  • 38,129
  • 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 url.sty would have been useful, but it didn't occur to me; I am a beginner! I will keep this in mind though. – makhlaghi May 05 '12 at 04:56