Manually adding *one* package to MiKTeX


Answer is an expansion of a comment made by John Kormylo.

  1. To avoid getting the message "this does not look like a TDS; are you sure...", extract into <dir>/tex/latex rather than just to <dir>/.
  2. cd to <dir>/tex/latex and pdflatex xcolor.ins to generate xcolor.sty.
  3. Using the MikTeX console to Settings->Directories, add the directory <dir> containing your sty file.
  4. Use Tasks->Refresh file name database.

One problem with manual installation of packages (where "manual" is defined as downloading a .zip file from CTAN and inserting it by hand into a TeX installation) is that it's also necessary to handle recursive dependencies.

For example, xcolor depends on the package mptopdf.

To find out the dependencies, after the steps above, run pdflatex usexcolor on a usexcolor.tex file containing


which will give you:

The required file "tex/context/base/mkii/supp-pdf.mkii" is missing.
It is part of the following package: mptopdf.

and that will mean that you need to repeat the steps above for mptopdf.


Related videos on Youtube

Author by


Updated on August 25, 2020


  • Calaf
    Calaf about 3 years

    I'm on Windows behind a firewall (you're offering your sympathies; I know; thanks). I need to add the package xcolor to MiKTeX.

    I download and unpack it in c:/Users/<username>/AppData/Local/Programs/MiKTeX 2.9/tex/latex alongside the packages that came with MiKTeX.

    Does there exist an "add to the index" MiKTeX command that does not need network access?

    Does miktexsetup make it possible to set up a local repository other than through --local-package-repository and --package-set=complete download? Using this pair requires network access.

    • John Kormylo
      John Kormylo about 4 years
      Yes. First, use the MikTeX console to Settings->Direcdtories and add the directory containing your sty file. Then use Tasks->Refresh file name database.
    • Steven B. Segletes
      Steven B. Segletes about 4 years
      The word "manually" can take on different meanings. The MikTeX console allows for a single package to be added or removed. To update a package, I will go and uninstall it, then reinstall it, all from the console.
    • Ulrike Fischer
      Ulrike Fischer about 4 years
    • Calaf
      Calaf about 4 years
      @JohnKormylo Thanks. I expanded on your comment. I'm unsure whether it's clean to install the dependency mptopdf also in <dir>/tex/latex or some other location is more appropriate, but it works.