I am trying to update an automated script for the creation of a portable miktex installation with specific packages. I can't get it to install the packages.

I have a file packes.txt that contains all the packages that I need (1 package per line) and the current installation process:

  1. Download miktex installer and rename it to miktex-portable.exe (as per instructions here: https://miktex.org/howto/portable-edition)

  2. Install the portable version to the location I want it (for simplicity I call the folder mikport here):

    miktex-portable.exe --portable=mikport --package-set=basic --unattended

  3. Install the list of packages (this step does not seem to do what I want)

    mikport\miktex.exe packages install --package-id-file packages.txt

    as per https://docs.miktex.org/manual/miktex-packages.html

  4. Run mikport\miktex.exe packages update

  5. Run a test build with pdflatex

The test fails because of missing packages that are supposed to have been installed in step 3. I may have misunderstood the command, I assumed it to be a replacement for the deprecated mpm require=@packages.txt. Is there a way to automate this (e.g. without using the miktex console)?

  • For now I just loop over the lines in the file and install per package. This works, but it seems much slower this way. Jun 10 at 12:53


Your Answer

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

Browse other questions tagged or ask your own question.