TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any portable minimal latex/xelatex distributions? I know of MikTeX portable, but at 130MBs it is far from minimal. Alternatively, can I easily make my own distribution?

What I would like to have is:

  • Ability to compile a pre-defined type of XeTeX document
  • Just the required packages included
  • Size under 5MB, ideally under 2MB

Any ideas?

share|improve this question
Do you want just XeTeX (i.e. with a plain-like format) or does it also need to have LaTeX? – Joseph Wright Mar 16 '11 at 15:02
I may be wrong, but your size requirements sound very optimistic to me. Are you really that constrained by the space available to you? – Anthony Labarre Mar 16 '11 at 15:15
@Martin H: For my purposes, it is. If my requirements can be satisfied, great. If not, what's the next best option? I am perfectly satisfied with an answer 20MBs, 50MBs (or 130MBs) if that is really the smallest size possible. Don't get me wrong, I appreciate your effort. Still, imagine somebody wanted to convince you to use Word instead of LaTeX: "but do you really need excellent line-breaking and so-called-nice-looking documents without wysiwyg in today's fast paced world?" – ipavlic Mar 16 '11 at 15:54
I'm using beside my miktex a rather bare development lua(la)tex (with the binaries from w32tex.org). The bin-folder contains also the format files and is about 10 MB large. To this you must add the space for fonts (luatex and xetex still needs TeX-fonts e.g. for math), packages, tools like dvips (e.g. for pst-pdf), bibtex, makeindex/xindy, package manager, ... I would say 5 MB is impossible today. 20 MB is very optimistic. – Ulrike Fischer Mar 16 '11 at 15:59
There exists a script that builds a distribution based on a single document. See tex.stackexchange.com/questions/8249 – Taco Hoekwater Mar 16 '11 at 18:57
up vote 14 down vote accepted

Summarising the various comments as an answer, the bottom line is that a target of 5 MB is unrealistic. For example, the Windows XeTeX binary on my system is 2.7 MB, while as Ulrike says

The MiKTeX package with XeTeX binaries has a size of 14MB.

(On my Unix system, the XeTeX binary is 17.8 MB). You need of course in addition to XeTeX the xdvipdfm system (I'm not sure exactly how that is packaged up on different systems.)

As an absolute minimum, you need in addition to the XeTeX binary some structure for finding files (kpsewhich or MiKTeX's equivalent), basic fonts (Computer Modern and Latin Modern), then a basic LaTeX (the base/required/tools, plus whatever you feel is 'minimal'). That is all going to add up.

Looking at the existing small distributions, BasicTeX (Mac-only) is 92 MB and MiKTeX basic is 157 MB. You could try to build something like one of these yourself, but the most obvious way to proceed is

Get either MiKTeX portable or TeX Live portable, install it and then remove the things you don't need (in MiKTeX you can use the package manager to remove packages).

(again from Ulrike's comment).

To get the size down, you should also look to remove all of the doc tree, as this tends to be quite big. Of course, you'll be left with no documentation, but it will be smaller.

share|improve this answer

As a 13 years long LaTeX user, I managed to have my own minimal distribution extracted from TeXlive, in the way Joseph Wright described in his answer, and installed it on my personal directory on a server at work (on windows platform) so that it runs in any computer I'm connected with.

It consists of pdflatex + bibtex8 + makeindex + scite + sumatrapdf and a few standard packages (base + tools + graphics + geometry + titlesec + pgf + hyperref and dependencies).

I also tweaked fonttext.cfg, fontmath.cfg and preload.cfg to have Latin Modern as default fonts so that I have no cm and ec fonts installed... All this stands in 30MB (~1300 files) so I can confirm that a standalone pdflatex system (without the editor, pdfviewer and extra package like pgf) stands in no more than 20MB. Surely xelatex and lualatex need more space because of bigger binaries.

share|improve this answer
Can you share your experience by explaining the steps? What parts are removed? @Bertrand Morel. – Edy Jo Jan 11 '14 at 2:42
I'm interested in the instructions as well, even though it seems like @BertrandMorel is no longer visiting TeX.SE. – Paul Kulchenko May 16 '15 at 5:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.