3

For a project, I intend to use TeX as a “backend” to layout and generate PDF, i. e., my program would emit core-TeX code to be immediately compiled. I think that means I just need pdftex or xetex + dvipdf and their minimal dependencies.

TeXLive, however, does not seem to account for such a use-case; even a minimal installation as described in a previous question contains tex, pdftex, luatex, bibtex, various dvi drivers, and some other things that I don’t think are all strictly necessary.

Is it possible to achieve my goal without having to manually prune such an installation?

Thanks for your help!

4
  • 1
    Maybe tex.stackexchange.com/a/509026/87678 ? – David Purton Jul 20 '20 at 14:05
  • Seriously: It's 2020 and you worry too much. Don't waste your time shrinking an installation from 1GB to 256MB. – Martin Schröder Jul 20 '20 at 21:08
  • 1
    Do you necessarily need to use TeX Live? E.g. if you're adventurous, an answer on the other question (of which I'm the only upvoter for some reason) mentions KerTeX and a size of 2 MB. (Of course you can't get that small if you want pdfTeX or XeTeX.) – ShreevatsaR Jul 21 '20 at 1:14
  • (I personally do sympathize with the idea, and find it smart.) – TFulop Jul 23 '20 at 18:44
3

The absolute minimal TeX Live installation is scheme-infraonly, which really means it: you don't get anything beyond that necessary to allow tlmgr to run. You can then add packages one at a time: this needs a bit of experimentation even with an ultra-small set of requirements.

As you almost certainly want to avoid sources and documenation, you likely want a profile file saying

selected_scheme scheme-infraonly
option_doc 0
option_src 0

to be installed using

./install-tl --profile=texlive.profile

(using whatever name you've given the file).

The resulting installation is about 3.0 Mb according to du -sh. Adding pdfTeX using tlmgr install pdftex, which pulls in things like the Computer Modern fonts, etc., takes it to 25 Mb.

4
  • You could install just pdfTeX with no dependencies, but I think the ones that TeX Live lists are pretty much essential. – Joseph Wright Jul 20 '20 at 18:43
  • Thank you! This is closer to what I intended! Is tlmgr a hard dependency of pdftex though? – Tau Jul 21 '20 at 17:46
  • @Tau It's a dependency for TeX Live, but not pdfTeX itself; if you are on Windows, you could try out W32TeX, which supplies the pdfTeX binaries. That's installed using simple zip files. – Joseph Wright Jul 21 '20 at 19:45
  • Comments are not for extended discussion; this conversation has been moved to chat. – Joseph Wright Jul 24 '20 at 14:01
1

Since you specify Linux, the most minimal package available for Debian/Ubuntu is texlive-base, which comes in at nearly 75 MB. If you don’t use an apt or rpm package, you would need to install tlmgr or another package manager to keep it updated.

It includes pdftex, biblatex, luatex (which you need to use texlua, e.g. for the getnonfreefonts installer to work), metafont, some fonts, color profiles, and glyph data.

Is there a practical need for the smallest installation possible? Even USB flash drives have dozens of gigabytes of space.

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.