When I try to compile my paper I get the following error:

! LaTeX Error: Filemathtools.sty' not found.`

Other packages are successfully found and automatically installed, but mathtools.sty is not. I just reinstalled windows 8.1 and Miktex 2.9 with TeXWorks Version 0.4.5. The paper compiles properly on my other machines.

I have found mathtools.sty online, but adding it manually only results in another style file not being found. What is going on - why is Miktex failing to automagically find mathtools.sty and other style files?

EDIT The problem is that the package manager has somehow "desynchronized" (even though it's a fresh install). To fix it, run Miktex Package Manager as administrator---there should be a version "Package Manager" and a version "Package Manager (Admin)" - run the latter. Go to Repository-->Synchronize. When that completes, close the package manager and your TexWorks should automatically find the needed style files again. If the synchronize fails, then you may not have run the (Admin) version of Package Manager.

  • 2
    What about Problems installing mathtools? Possible duplicate. – Werner Sep 16 '14 at 23:38
  • 2
    As said in the link mentioned by @Werner, the mhpackage has recently been split in two parts, one being mathtools Unfortunately, mh is still being displayed by MiKTeX Package Manager, albeit it was removed by the last update. Ask to install mathtools, not mh any more. – Bernard Sep 17 '14 at 2:56
  • 1
    same problem here, what suggested in the EDIT did not work for me, I opted for installing the sty directly from CTAN, as suggested in @Werner 's link. – Irene Sep 18 '14 at 14:08

Adding an answer here for completeness, for who is looking for this.

Open MiKTeX Package Manager (Admin)
On Windows 7 its from Start -> Programs -> MiKTex 2.9 -> Maintenace (Admin) -> Package Manager (Admin) (should be similar on Windows 8.1 etc.)

From the Repository menu choose Synchronize.

  • Worked for me ! – Tina J Jul 30 '15 at 22:48

I've had a similar problem with Texmaker at work (where some computers don't run with administrator privilege by default). I had to run the program as an administrator to 'find' the required packages and style files and successfully install them.

  • 1
    This doesn't solve anything – jbx May 27 '15 at 23:18
  • @jbx yes it does. There are two different problems about installation of mathtools. This solves one your answer solves the other. Be a little considerate when answering. See werner's link under the question. – percusse May 27 '15 at 23:24
  • 2
    @percusse No it does not. The problem has to do with outdated package information in the MiKTeX repository. Running Texmaker or Texstudio as admin does not make any difference. Werner's link is in fact the same, I just included my answer for completeness for who is looking for it because this question comes up in google first when you look for the error. You have to run the MikTex Package Manager as admin (in case you have some restrictions on your PC) not Texmaker or Texstudio. – jbx May 27 '15 at 23:53
  • @jbx Yes it does. First your answer is already in the question, read it under the edit paragraph so it is already included. Second if you are not running it under admin mode and update your TeX distro, it will loose its track about mathtools because MikTeX will change its location. If you don't have admin rights it will not solve it hence you also need to have the admin priviledges even if one uses your solution. Otherwise your solution will not solve the problem. – percusse May 27 '15 at 23:58
  • @jbx: I'm just sharing what worked for me (without shooting down your solution). – Keplerian May 28 '15 at 12:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.