Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Miktex: enable installing packages on the fly from command line

Tags:

miktex

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.

like image 757
Quant Avatar asked Sep 04 '17 09:09

Quant


People also ask

Where are MiKTeX packages installed?

sty file with MiKTeX as follows: Navigate to the folder where LaTeX packages get installed. If you accepted the default location when you installed MiKTeX, this folder is probably C:\Program Files\MiKTeX 2.9\tex\latex. (If you have an older MiKTeX installation, this folder is probably C:\texmf\tex\latex.)

How do I use MiKTeX console?

MiKTeX Console is a desktop application, i.e, it can be started in the usual way by searching and clicking MiKTeX Console in the application launcher (Windows start menu, Unity Dash, macOS Launchpad).


1 Answers

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
like image 94
Christian Schenk Avatar answered Oct 06 '22 00:10

Christian Schenk