I want to run a XeLaTeX instance in Amazon Lambda (Linux). I need the binaries to be less than 200MB. What I need to achieve:

  • Create a text-based pdf file out o
  • Use many languages as available, including Chinese, Japanese, Korean, Arabic.
  • Use custom OTF fonts (e.g. Adobe Garamond Pro).
  • Portable, if possible.

No need for math formulas, diagrams, graphics, documentation, source files.

How can I get the size of the binaries as small as possible? I tried the TeXLive distribution, but the "small scheme" that includes XeTeX it is 441MB, way over my limit.

  • How many fonts? My (2016) TeX Live seems to have about 2.2 GB in the doc folder, 1.9 GB in the fonts folder, and 307 MB in the tex folder (of which 161 MB is in tex/latex). XeTeX is also the biggest binary on my system (23.5 MB), and what about other programs? To do it all in under 200MB is going to take some real work.... – jon Mar 24 '17 at 2:03
  • According to tex.stackexchange.com/questions/13649/… "MikTeX basic" used to be 157 MB, but I wouldn't bet my own money that you can add everything you want (or need) and stay under 200 MB. – alephzero Mar 24 '17 at 3:13
  • Maybe install the small scheme on your PC and set up a test document and then deinstall package after package. – Dr. Manuel Kuehner Mar 24 '17 at 3:41
  • I believe that the reason CJK fonts are not included in the full scheme by default is that they are huge. The directory containing Noto fonts on my system (truetype fonts for a wide variety of languages, including CJK) is 145M. You can't exclude maths fonts and support for formulae. Note that XeTeX also requires a second binary i.e. it is a two stage compilation, in effect, which is why you can specify different options. It is also somewhat tricky, as I understand it, to use non-TeX fonts with XeTeX as opposed to XeLaTeX. If you mean LaTeX, Polyglossia and fontspec, too, .... – cfr Mar 24 '17 at 4:36
  • 2
    if using xetex you have the possibility of deleting the entire tex font tree which will massively cut down your tex installation, just use the sytem opentype fonts that you will have already as part of the operating system setup. and you only need xetex and xdvipdfmx bianries – David Carlisle Mar 24 '17 at 7:58

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.