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.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
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

 
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.