10

Some of my bigger LaTeX documents have more than 20 packages from CTAN, on which they depend on. On my local machine all the packages are installed, but if someone else wants to edit the document and compile it, usually a few packages are missing.

Is it possible to install the missing packages by a single command?

Everyone is using TeXLive.

12

The default installation of TeXLive is to install every package, so it usually won't be an issue; however, installing missing packages on the fly is possible with texliveonfly. It is available through CTAN, so to use it:

tlmgr install texliveonfly  % If not already installed
texliveonfly document.tex

If you're on Windows and have MikTeX, it will actually do that installation automatically assuming you have that settings enabled.

Note that although texliveonfly will find and install packages for many files, it doesn't handle all files. For example, it won't installing missing font packages, nor will it install packages such as babel-en.

  • Sounds pretty awesome. I'm gonna check this out. Thanks! – Sam Feb 5 '16 at 15:31
  • 1
    Just to note my experience: texliveonfly was installed fine via tlmgr but it picked up pdflatex from the Linux distro rather than the one from personal texlive installation when compiling the .tex file. Pointing --texlive_bin to the latter solves the issue. – alick Mar 26 at 20:11

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.