Short version of the question
I need to automatically (not manually) install some packages that were not included after the installation of MiKTeX 2.9. I was able to solve this problem by following Leo Liu's responce, but this process is very manual... Is there a way to do the same, but using the command line? Or even better using a batch file or something similar?
Long version of the question
I am creating an automatic process to install MiKTeX and compile a .tex file to produce a .pdf document. This process would be used in our floor plant and implemented in all of our systems. Those systems run Windows 7 Professional 32-bit but do NOT have internet access. Which is why we have to bring all executables and required files in a USB-installer to the floor plant.
All the things I've tried so far:
- At first I though that if MiKTeX was installed with the option “Install missing packages on-the-fly:” set to Yes, it would do the trick. Unfortunately, this seems to only work if there is internet connection...
Then I tried to create a local texmf tree in MiKTeX, as Speravir explains here, or several others explain too. Unfortunately, just like @user5751924 [1] and others, creating a "TDS compliant root directory" seems an impossible task... This goes in conjunction with trying to use the
mpm(MiKTeX package manager) command [2], going also nowhere. In particular, the mpmcli_admin.log always says "Not a package repository" when I try for example:mpm --admin --install-some=list.txt --repository=C:\localtexmfHere, the "list.txt" contains (among others) the following packages that I need to install:
titlesec
fancyhdr
xifthen
xcolor
tikzpagenodes
grffile
All those packages were manually downloaded and added to the USB-installer, in a fashion that should be TDS compliant, but clearly something is going wrong.
I have also tried to consult the MiKTeX Manual but no luck there. I even looked at the PackageManager.cpp source code to try to understand what was the problem with my directory, but that was a dead end :(
Finally, I did the manual install from @Leo Liu's responce, and it worked in one machine! But since this process needs to be done for hundreds of machines in the floor plant, the process must be automated. So his response doesn't help me too much.
How can I automate a process to do this using the command line? Using a batch file is also acceptable. Or any other help is extremely welcome!
THANKS IN ADVANCE!
PS. I'd be happy to provide any extra information if needed...
[1] Exact definition of a "local package repository" and exact associated procedures
