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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Latex so forgive me if the questions are dumb...

I was trying to right left-top corner superscript, someone recommended mathtools package on this forum: Left and right subscript.

So I downloaded mathtools.zip from CTAN, unzip it, there's an "mathtools.dtx". In the package there are documents but none talked about how to install, I fancy the installation is just too primary to real Latex users.

OK, then, there's still another thread here explained the steps: How can I manually install a package on MiKTeX (Windows) . So here I follow

  1. I ran "tex XXX.dtx" (there's no *.ins files) on all the .dtx files under the extracted folder, that includes: breqn.dtx, flexisym.dtx, mathstyle.dtx, empheq.dtx, mathtools.

  2. Then I created a folder "C:\athos\localtexmf\mathtools" and put all the new files in.

  3. Then I go to "Windows -> Start -> Programs -> MikTex 2.9 -> Maintenance (Admin) -> Settings (Admin) "; in "Roots" tab I added path "C:\athos\localtexmf"; in "General" tab I clicked "Refresh FNDB" and then clicked "OK" to close it.

  4. I restarted my WinEdt, added "\usepackage{mathtools}" under "\documentclass..."; and added "test $\prescript{14}{2}{\mathbf{C}}$ " in the main body.

After that when I try to "MikTex", the error still comes up: "The required file tex\latex\mh\mathtools\sty is missing. It is a part of the following pakage: mh . The package will be installed from ..."

Seems the folder "C:\athos\localtexmf\mathtools" is not captured by MikTex?

Then in the error message dialog, I choose "Change", choose "Package shall be installed from a directory", click "Next", choose ""C:\athos\localtexmf\" or "C:\athos\localtexmf\mathtools", in either try it says "Not a local package repository".

What shall I do?

I'm on Microsoft Windows XP Prefessional SP3, WinEdt 8 (Build: 20140613 (v. 8.2) - 32-bit), and MikTex 2.9.

share|improve this question
You should install mh from MiKTeX's package manager, you'll have no problem. Why do you want to install manually a package that's in the distribution? – Bernard Jul 3 '14 at 1:52
@Bernard let's say rookies shoot their foot :p – athos Jul 3 '14 at 1:58
Hi. I try to install the mathtools from mh bundles in the package manager, but it shows 'Error response from server: 404' . May I know how to solve this problem? – Idonknow Aug 26 '14 at 4:06
@idonknow my problem was that in my company there was a proxy, it works perfect for browsers but seems the TeX update does not recognize it. Not knowing how to config TeX proxy, I did the update at home , where my WiFi has no proxy – athos Aug 26 '14 at 13:56
In August 2014, the mh bundle of packages was broken up into two parts. The advice sought (and given) in this posting about installing the mh bundle is no longer applicable for versions of TeXLive and MikTeX more recent than August 2014. – Mico Jul 6 '15 at 22:59
up vote 17 down vote accepted

If you have installed MikTeX 2.9 (on Windows) is very easy. You can go to

Home->Programs->MiKTeX 2.9->Maintenance (Admin)->Package Manager (Admin)

Alternative path to admin exe file C:\Program Files (x86)\MiKTeX 2.9\miktex\bin

or without (Admin) if you want to install the new packages in a local directory. There you can choose any package and to install it by clicking in + button. In case of the mathtools package you can find it in the mh bundle (it appears in the list of installable packages) and provides a se­ries of pack­ages de­signed to en­hance the ap­pear­ance of doc­u­ments con­tain­ing a lot of math­e­mat­ics (mathtools included).


From August 19'th 2014 the mh bundle has disappeared in MiKTeX, now it's possible to find the mathtools package separately.

share|improve this answer
It started to download and failed : "connect failed in tcp_connect()" -- I'm behind a firewall, may I check how to set the proxy? – athos Jul 3 '14 at 2:04
@athos Try again, and make sure you have a good internet connection or choose another download server (mirror). – skpblack Jul 3 '14 at 2:10
do you mean that i don't need to set up the proxy server ip etc? mmm, if so i guess the reason is the proxy prohibited some files (.exe or too big file), let me try it at home. – athos Jul 3 '14 at 2:23
@skplack thanks! it's working :) – athos Jul 3 '14 at 18:19
I can use tool mathtool with MiKTeX. In my package manager it is listed with the packaging date 2014-08-19 and I can run it! So edit 2 seems to be obsolet ... – Kurt Oct 14 '14 at 14:48


I had the same problem with mathtools and MiKTeX today, the same initial error about the missing .sty file. Going to:

MiKTeX 2.9\miktex\bin

I ran mpm_mfc_admin, went to the Repository tab at the top and clicked synchronise. mathtools is now in my package list and I can confirm it works; no more missing .sty file.

Mathtools in MiKTeX Package Manager (Admin) as of 14/11/14

share|improve this answer

protected by Community Jul 6 '15 at 22:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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