TeXLive — on Android

by Willie Wong

I’ve just done something that is, admittedly, rather silly. And I am somewhat surprised that it actually worked.

I managed to have TeXLive running on my new Samsung Galaxy Tab A, which runs Android.

It is painfully slow (speed is comparable to my old netbook from 2010). But in a pinch, I now know that it works. And that gives me some (minor) peace of mind.

What I did

  1. First, install Termux from the Play Store. (For those of you FOSS-minded, it is also available on F-Droid.) Termux is a terminal emulator with supports from some Linux Packages. (An alternative is to install GNURoot-Debian, but I’d rather not try to maintain a full Debian installation on a tablet, running on top of Android, if I can help it.)
  2. Next, fire up Termux. It is very helpful to run as your first command termux-setup-storage to enable certain symlinks and give access to the external SD card if you have one.
  3. To install the most basic of TeXLive, you just need to run pkg install texlive.

Now, the basic TeXLive distribution is missing a lot of useful packages. You can maintain the TeXLive installation via tlmgr as usual. A few collections that could be good to install are

  • collection-fontsrecommended
  • collection-latexextras
  • collection-mathscience
  • collection-bibtexextra
  • If you use additional fonts I would suggest installing them one-by-one (I installed kpfonts as that’s the one I use almost exclusively); fonts take up a lot of storage space and accounts for, on my desktop, 75% of the on-disk size of TeXLive.

    My current installation of Termux uses 600MB, and about 80% or more of that is TeXLive.

    Here are some additional Termux packages that can be useful to complete your TeX needs:

    • coreutils: Termux by default use busybox to emulate most utils; proper versions of standard Unix commands are useful to have.
    • openssh
    • git
    • neovim: If you need a text editor on the terminal…