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.

I am trying to typeset my document, but the including the hyperref package gives me the following error:

The required file tex\latex\url\url.sty is missing.

Now my problem can probably be solved by installing the url package, but my question is: Why do I have to do this? There are no odd references in my document. I even tried using it like this

    \documentclass[12pt,a4paper]{article}
    \usepackage{hyperref}
    \begin{document}
    Hello
    \end{document}

and it still produced the same error message.

So why won't this work? Is the hyperref package useless without the url package?

share|improve this question
2  
Your TeX installation seems to be broken or incomplete! –  Christian Hupfer May 19 at 14:18
    
@christianhupfer How can I confirm that it's indeed broken and if so: how do I fix it? Simply reinstall? –  gebruiker May 19 at 14:26
    
Did you check whether the url.sty is really not under the specified position? If it is there and it cannot be found nevertheless by the TeX system, it is perhaps broken (missing environment variables) On which OS do you use TeX and which distribution is there? –  Christian Hupfer May 19 at 14:29
    
@christianhupfer I really wouldn't know where to look for the file url.sty. I am working on windows 7 and using miktex 2.9. –  gebruiker May 19 at 14:38
1  
I'm using Miktex 2.9, maybe you have to change the settings. Check the option Install packages on-the-fly: If you need a new package installed you get asked to download it, then it's installed automatically, also it has a nice package-updater (which you have to start manually from time to time...) –  musicman May 19 at 15:05

1 Answer 1

up vote 2 down vote accepted

I think, links including URLs and their typesetting are an essential part of hyperref. Typesetting URLs does not need to be invented by hyperef, because package url already makes a good job. Therefore hyperref loads package url (and other packages) via \RequirePackage.

Of course, documents without any use of \url exists, thus a auto-load feature would be useful, but:

  • A package cannot be loaded after \begin{document}.

  • The first \url might be called in a group. All local definitions of the packages would be lost after the group (if package loading would be possible). Then at the next \url, the packages would have to be loaded again. But then the global resources are already present, possibly causing trouble.

  • Package hyperref could note the usage of \url in the .aux file and load the package url in \AtBeginDocument. But:

    • There are packages that can/should not be loaded at this late time.
    • One more LaTeX run is needed, because the first run might be garbage because of the missing package url.

A clean solution would be, if the TeX distribution takes care of package dependencies and install the required packages automatically, if a package is installed. For example, TeX Live maintains some dependencies. However, there are way too many packages to do this on a fine-granularity level. Each package has to be inspected and analyzed. And this needs to be repeated at each update of the package.

But there are not any volunteers, which are willing to dig through thousands of packages and to do this on a regular basis for new package and updates. And I do not see anyone, who is willing to pay for such a service.

AFAIK, there is just one person, who maintains MiKTeX, there is one person, who maintains the TeX Catalogue, there are a handful (at most) persons who maintain TeX Live and there are a handful (or less) persons that keep CTAN running.

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.