Is it possible to change packages that are installed by miktex? If I install a package manually, the .sty and .def files are textfiles and changeable. I thought it would be exactly like that, if miktex installs the package by itself. But I can't find the files. Are they binary files? Or am I only blind and don't see them?

bumped to the homepage by Community yesterday

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • 2
    The packages MikTeX installs are just like that. They are mostly plain-text .sty, .tex and .def files. On my machine most packages live in C:\Program Files\MiKTeX 2.9\tex\latex, but if you have a single-user install yours might be in C:\Users\<User name>\AppData\Roaming\MiKTeX\2.9. You can see where the packages go in the MikTeX Console in the Packages tab. But please note that it is extremely bad practice to edit files installed by your TeX distribution in place. You can edit renamed copies of those files if you like, but changing the originals just asks for trouble. – moewe Mar 20 at 9:41
  • The Settings > Directories tab in the MikTeX Console also has some info. As for why it is bad practice to manually edit distribution-installed and -controlled files: The files may be overwritten by updates or other changes and your modifications get lost. You may also want to cooperate with other people, ask questions here or just compile your document on a different system. If your document relies on your private modifications to an otherwise public package that can lead to incompatibilities and different results on different systems. Something LaTeX tries to avoid if at all possible. – moewe Mar 20 at 9:43
  • Thank you. It was not C:\Users\<User name>\AppData\Roaming\MiKTeX\2.9. In my case it was the C:\Users\<User name>\AppData\Local\Programs\MiKTeX 2.9. – Ahrtaler Mar 20 at 10:17
  • 2
    The easy way to find where the package is located is to compile a small tex program that uses the package. The log file will tell you exactly where it found it. If you then go there and, for example, delete the .sty file, and recompile, MikTeX will be forced to reinstall the package. This is one way to bring packages up to date. The other method is using the package manager to uninstall and reinstall packages. – Steven B. Segletes Mar 20 at 10:35
  • 2
    You can also find the location of a .sty file by calling kpsewhich filename.sty in the command line. – moewe Mar 20 at 13:29

Because of moewe I found the directory, wehre the packages are stored. Like moewe pointed out, you can find it in the miktex console in tab Packages.enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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