Some developers may doubt if I’m just reinventing wheels. I certainly don’t want to reinvent wheels for no reason. As I said on the homepage, my own pain with existing LaTeX distributions is that they are often too big, and the documentation, while being comprehensive and useful, usually does not highlight the most useful part to me (how to find and install a missing package).
I also dislike the fact that it often requires sudo
(on *nix) to manage LaTeX packages. For personal computers, I don’t see any point of requiring sudo
, considering the fact that TeX Live can be a self-contained folder that can be placed anywhere on your computer. I waited for a couple of years before tlmgr
was finally available on Debian/Ubuntu, and I was extremely excited about it, but soon disappointed, because it seemed to be broken and not usable at all (couldn’t do anything with it). I checked it again this year, and it still seems to be broken. Perhaps I didn’t use it correctly (anything I try will lead to errors), but you are only allowed to use the user mode of tlmgr
, which is very restrictive to me.
My daily OS is macOS, and the officially recommended TeX Live distribution is MacTeX, which contains several additional packages that I don’t need, such as the TeX Live Utility (I know how to use the tlmgr
command), TeXShop (I use R Markdown primarily and hope not to edit or even read raw LaTeX if possible), LaTeXiT, and so on.
In fact, I appreciate one nice feature of MiKTeX on Windows (which seems to be cross-platform now): automatically installing missing LaTeX packages. I think this is very helpful, so I borrowed this feature to the R package tinytex, and R users can enjoy the same feature when using TeX Live or TinyTeX. That said, even the basic MiKTeX is still too big, and one issue that drives me crazy is bibtex.exe
in MiKTeX: it always adds the .bib
extension to the bibliography database file in the .aux
file, e.g., when we have \bibliography{foo.bib}
in bar.tex
, bibtex.exe
generates \bibdata{foo.bib.bib}
in bar.aux
. Anyway, I have patched this issue in the R package tinytex for Windows users who use MiKTeX. TeX Live users don’t suffer from this issue.
On this page, I’ll let other users share their stories of installing and managing LaTeX. First I want to show a list of painful cases that I was aware of:
-
Is there a lightweight implementation/distribution of TeX for Mac OSX?
-
Installing (a lightweight version of) latex on an external hard drive
-
texlive-full is too big, too big, and just too big for Docker images
-
Missing LaTeX packages confuse users forever, forever, forever, and it takes forever to figure them out and install. Error messages can also be confusing. Sometimes we just don’t have a clue.
-
When all you need is a LaTeX package, upquote, of which the size is 5K, you have to install 500MB of additional software on Ubuntu/Debian.
-
You may suffer from old bugs that have been fixed in certain LaTeX packages.
-
MiKTeX might fail and we don’t know what the error message “GUI framework cannot be initialized” means. Sometimes we have no clue why it doesn’t work.
Below are stories and experiences contributed by other users:
Removed TeX Live from my system (openSUSE): 1.5gb. Installed TinyTeX + the dependencies to compile my thesis: 150mb!!!! This is great!
Really liking the simplicity of tinytex package. Easy to get up and running to knit PDFs. No need for slow LaTeX install.
A tiny LaTeX distribution easy to install from RStudio or on Travis CI is just what we needed!
Seriously one of my only holdups teaching LaTeX in Rmarkdown (still taught it anyway) is now solved.
Tried TinyTeX with rmarkdown and both English and Chinese rendering. The most smooth experience ever using LaTeX!
— Kun Ren
TinyTeX is awesome, if it had existed before I would have saved hours of my life spent dealing with LaTeX packages and failed R Markdown knits…
Many people don’t realize that Texlive on some Linux systems (say you need a rstudio server) doesn’t come with the TeX package manager. If the package you need is not in their system, you are basically screwed as you can’t even install it. TinyTeX solves this problem and makes everything sweet and easy. Also, after using it for more than a month, I found the messages of tinytex are very helpful, comparing with basically NULL in texlive.
— Hao Zhu
I’m a novice with R and I found the entire process of installing rmarkdown, knitr, MiKTeX, and pandoc and then reconciling all their directories very difficult. […] The 3-4 hour detour into MiKTeX etc and how to produce PDFs was a frustration experience to say the least. (Up and running with TinyTeX five minutes later…)
— Justin Shapiro
If you work in a locked down windows corporate enviroment and spent countless hours with MiKTeX or portable MiKTeX, you’ll want to buy @xieyihui lunch.
Too bad, this computer had a good month of TeX-free.
I’d been avoiding installing LaTeX on my macOS and Windows machines b/c it’s always such a hassle. Just learned about about TinyTeX today and easily got setup on both machines.
Like 2 hours later, I’m not sure I want to know, but there must be a faster way of updating all my TeX packages than the ftp in TeX Live Utility…
Installing a complete version of MiKTeX is a freaking nightmare though. Don’t know if it’s my internet connection or what but I just can’t get it all installed in one go. I finally just did the basic install and am selecting batches of pkgs at a time to add.
[…] I just installed this (TinyTeX) and it was SO EASY and I’m kind of upset that I didn’t know about it before. Gonna be shouting this one from the rooftops.
Siri, how much of my life have I spent installing TeX distributions?
I have discovered that the tinytex package has handy tools for analysing the .log files, which solved my problems for me. That is, after I wasted half an hour trying to install MiKTeX for no good reason
I used tinytex to upgrade TeX Live and install a package and it … worked. @xieyihui may have ended some of my LaTeX torment.
literally took me longer to remove all traces of MacTeX than to install TinyTeX and all the packages needed to build my thesis, and i saved about 10gb of disk space.
I’ve always had a problem knitting to pdf with windows. I followed instruction for tinytex and it works great now!
Learning to write a LaTeX manuscript in R Markdown and was having problems loading new packages: tlmgr wasn’t updating the packages. So, found the “tinytex” package that fixed everything.
— Akash
Just had to reinstall texlive on my Mac and once again, @xieyihui’s tinytex package saves the day with tinytex::reinstall_tinytex().
Having just for fun installed R on my new Raspberry pi 4, I thought to myself now it would be nice to have latex, but really, all of texlive, probably not, so this was exactly what was needed. It installed for me immediately and “just worked.”
I’ve always had problems knitting to pdf on Windows until I came across tinytex package.
[…] uninstall MacTeX and install TinyTeX was the ticket! It FINALLY knit to pdf!!!!
[…] Why install 3GB of languages you don’t know when all you want are beautiful tables?
[…] Have you tried {tinytex}? It installs only what you need from LaTeX so you can knit to pdf! Changed my life!
[…] R Markdown + library(tinytex) basically unlock all of the power of LaTeX without any of the headaches.
A nice, ultra light, LaTeX distribution, I used TinyTeX on my chromebook for a while.
But also LaTeX took 6 hours to download and now I’m struggling to set the path variable for it so maybe I’ll just give up for today and try tomorrow.