Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OT but readers of this comment section are likely to know.. why is a LaTeX distribution 5.8GB in size[0]? That feels far too large for a tool that's been around for decades and primarily deals with text.

[0] https://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-18...



It's 5GB because it includes every single extendable package too, as well as their documentation (in PDF format, of course). There's a healthy TeX package ecosystem [0]

Windows users have the option of installing via MiKTeX instead of TeXLive, the benefit being that MiKTeX has a package management system which installs the base packages at start and then automatically downloads the others as and when they are needed. [1]

Not sure if that's possible in other OS'?

[0] https://www.ctan.org/

[1] https://miktex.org/


Both texlive and miktex allow selectively installing some packages only. AFAIK the difference is that miktex will show a popup saying «do you want to install foopackage?» when you try to compile a document which uses foopackage, and you don’t have foopackage on your system. Kinda like on ubuntu, you get «you can install this command by running apt-get install foopackage».


But isn't that quite a big difference? MiKTeX will actively download and install the extra package for you there and then, whereas with TeXLive you'll need to rerun the installer (?) or download the packages from CTAN?

I must admit I speak as a Linux user who's installed TeX on Windows machines, but not really gone into detail myself, so please correct me if I'm wrong.


You just run

     tlmgr install <package>


Whaaaa... I had no idea. Thank you!


It’s a big difference, but the parent post indicated that partial installation was not possible at all. At least that was my understanding.


Do NOT install MiKTeX unless you enjoy finding new ways to literally waste your time. Yes, it's a tad bit more user friendly, but it's also literally ~twice as slow as TeXLive. I really wish people gave this heads up when mentioning it... it should be a criminal offense not to! I wasted so much of my life just waiting for it to compile and I only found out TeXLive was so much faster when it was years too late.


There used to be teTeX (https://www.tug.org/tetex/) which allowed installing packages separately, but that's no longer maintained.

I think KerTeX (http://www.kergis.com/en/kertex.html) now allows a similar style of pick-and-choose package installation, but it doesn't support a lot of packages (yet?).


If you select "custom" instead of "full" when installing TeX Live, you can select packages case by case.


If you just want to compile a TeX document without drowning your hard drive, I heavily recommend Tectonic (https://tectonic-typesetting.github.io/en-US/), which behaves more like a typical development tool.

On macOS:

    brew install tectonic
    tectonic mypaper.tex
This will automatically download the exact set of packages needed to compile the paper, and cleanup any intermediary files generated during compilation. And it's trivial to upgrade and uninstall.


Note though that this Tectonic is based on a fork of the tangled XeTeX sources (i.e. not the actual WEB source code but the machine-generated C translation) as of some past date. This is a very weird choice probably due to the author (understandably) not being able to make sense of the mess of TeX sources to figure out what's the actual source code. As a consequence, already it has begun to diverge; for instance it does not contain the \expanded primitive that was added to XeTeX last year. Overall, Tectonic seems to have many good ideas, but suffers from being not too familiar with TeX itself and the TeX ecosystem.


Very cool, thanks for sharing.


By default it includes pretty much everything anyone uses. Imagine installing the most popular 90% of PyPI or CPAN, and that probably gets the idea across. Without documentation (online is usually easier) and support for umpteen languages, it's less than half that amount of space. Even better, most of it is platform independent, so can be shared between operating systems; I use the Linux installer in WSL and tell it to install the Windows binaries, and it takes barely any more space but can be used transparently from either OS.


I think it's in large part due to documentation and fonts. For example in my Fedora, I only have part of texlive installed. My /usr/share/texlive/texmf-dist is 1.3G, of which 428M are inside the doc subdirectory and 639M are in the fonts subdirectory.

Then there are many packages that contain pictures or logos. As a single random example, texmf-dist/tex/latex/fithesis is 2.4M, of which 2.1M are in fithesis/logo.


There's also [ConTeXt](https://wiki.contextgarden.net/Main_Page) which is around 0.4 Gb. I have found it better in many respects and so could you.


I should know (have been using LaTeX for nearly 30 years) but... what does ConTeXt give that LaTeX does not? I have never made heads or tails of it.

Thanks.


I wanted to ask the same thing. In my head ConTeXt is to LaTeX as XML is to HTML, a more general variant of the same language. Is that analogy plausible? In what use cases would ConTeXt make more sense than LaTeX?


LaTeX was written and basically frozen in the 80s/early 90s (LaTeX 2e is from 1994). The core ("kernel") of LaTeX cannot be changed as a lot of documents would break. Since then, a very large number of users of varying competence have written ad-hoc packages to extend or customize it. To change the appearance the recommendation often given is to write a .sty file, which is something of a dark art.

ConTeXt is from about a decade later, after some lessons were learned.

More here:

- https://tex.stackexchange.com/questions/223177/what-is-the-m...

- https://tex.stackexchange.com/questions/4987/why-should-i-be...

- https://tex.stackexchange.com/questions/1887/what-typesettin...

- https://tug.org/interviews/hagen.html

- https://tex.stackexchange.com/questions/29979/how-do-latex3-...

- https://tex.stackexchange.com/questions/447566/health-of-con...

My impression: What you get with LaTeX is a larger ecosystem and greater likelihood that someone has already done what you need (in some package or other, though it may be only "close" and figuring out how to improve it may be hard). What you get with ConTeXt, at the cost of having to re-learn everything you learned about LaTeX and not being able to use any of the LaTeX packages, is a more consistently designed interface, a greater understanding of what's going on, more ease of modifying things (instead of the "there's a package for that" phenomenon), and best of all not having to "program" in the TeX macro "language" (you can use Lua).


Thank you too! This has got me excited to try ConTeXt.


Thanks!


For macOS, there is a small BasicTex package: https://tug.org/mactex/morepackages.html

It is missing most packages though, but only ~76M.


https://yihui.name/tinytex/ is a pretty cool minimal tex distro with nice utilities for finding dependencies, if of interest :-)


Thanks for the link, looks very useful!


It's been in the GB range when I used it in the early 2000s. Always wondered that myself.


Most of that is documentation (PDF files) and fonts (often in multiple formats for the same font). I skip the documentation and read them online on texdoc.net, and it trimmed down my installation size to 2.9GB (2.1GB of which are fonts).


It's interesting to know that you can install partial packages. I personally roll with texlive-science.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: