Search code examples
miktex

Miktex: enable installing packages on the fly from command line


Is it possible to enable the option install packages on the fly from the command line, i.e. without interacting with the npm gui?

This would be useful for setting up miktex on CI services such as appveyor.


Solution

  • You can achieve this by setting the [MPM]AutoInstall value:

    initexmf --set-config-value [MPM]AutoInstall=1
    

    1 means: install without asking the user. Other possiblie values are:

    • 0: turn off automatic installation
    • 2: ask the user