111

I would like to know how to install LaTeX on Mac 10.6 or higher.

But the MacTeX is some 1.28 GB file! Is there a smaller distribution I could install?

What exactly is TeX Live?

7
  • 1
    possible duplicate of I want to start using LaTeX on a MacOS. Where do I start? Commented Aug 4, 2010 at 5:24
  • 2
    Then maybe the question should be edited to something like "why is mactex so big?", also I don't see why "10.6" is relevant to have on the title. Commented Aug 4, 2010 at 7:22
  • 10
    The size is not so unexpected for "everything" (all packages and their documentation); the equivalent on Ubuntu: sudo apt-get install texlive-full says Need to get 1,012MB of archives. After this operation, 1,805MB of additional disk space will be used. Although for any given person many of the packages would be useless, it's really convenient to just install MacTeX and forget about having to hunt for packages in the future. Commented Aug 4, 2010 at 7:40
  • 5
    I don't think the answers sufficiently explain MacTex's size. Google Chrome is 65 MB and also renders markup to PDF. Apples to oranges, sure, but Chrome is arguably more sophisticated than LaTex. Commented Feb 12, 2018 at 14:47
  • 6
    August 2019, MacTex is now almost 7GB. Seriously?! Commented Aug 13, 2019 at 11:01

8 Answers 8

104

MacTeX (and by extension TeX Live) are so big because they contain everything up to, and including the kitchen sink, then heaps on yet more stuff. Odds are, out of that 1.3 GB archive you will only use 300-400 MB worth of files on a regular basis. This is similar in size to an application like OpenOffice.

There is an alternative to downloading and installing a 1.3 GB TeX distribution if you are using Mac OS X.

BasicTeX

One thing that hasn't been mentioned here, or in I want to start using LaTeX on a MacOS. Where do I start? is that MacTeX is available in a "Lite" edition called BasicTeX that has been stripped down to ~90 MB.

The trade-off that comes with using BasicTeX is that you will have to download and install additional packages and programs as the need arises- and BasicTeX is so basic that the need will arise. Unfortunately this is a lot more difficult for first time users than it really has to be. MikTeX has been delighting TeX newcomers on Windows for years by automagically installing missing packages as they are needed.

So, after installing BasicTeX you will be faced with the tasks of installing additional programs and installing missing packages.

Installing Additional Programs

The components of TeX Live installed by MacTeX and BasicTeX includes TeX compilers and associated macro-systems such as LaTeX, ConTeXt and their add-on packages and modules. These programs are command line based and focus on turning .tex files into output such as PDF documents- they leave the details of creating .tex and associated files up to the user.

MacTeX includes additional programs such as an editor and a BibTeX reference manager that help users to work with TeX outside of the command line. BasicTeX does not include these GUI programs. There are two ways to add GUI support to BasicTeX.

Install the MacTeX Additions

Go to the page where BasicTeX is available for download and download the mactex-additions package. Installing this package will provide all the GUI programs that are included in MacTeX but excluded from BasicTeX.

Do it Buffet-Style

Since the whole point of installing BasicTeX over MacTeX was to avoid downloading things we never use- you can install the GUI programs yourself by mixing and matching to your liking. Here are some things you may want:

  • The TeX Live Utility. You will want this- it provides a nice GUI to tlmgr which is the command line program that installs additional packages for TeX Live. This is how you will add missing packages that are required by LaTeX documents.

  • A nice editor. Choosing an editor is like choosing a religion so you may want to weigh your options. MacTeX includes TeXShop which is a nice Mac-only editor for .tex documents. TeXworks is similar but also works on Linux and Windows.

    The universe of TeX-aware editors is covered in detail by this question.

  • A program for managing BibTeX entries. BibTeX is a wonderful component of TeX Live that makes the creation and formatting of bibliography entries a breeze. Unfortunately, creating BibTeX input files introduces yet another learning curve. This problem is solved by programs that create the files for you given information such as titles, author names, publications, etc. MacTeX includes BibDesk which is an excellent Mac-only program for managing BibTeX entries. Another good choice is JabRef which is cross-platform.

Installing Missing TeX Live Components

Missing Packages

You will know there is a missing package when you attempt to compile your document and compilation stops with an error message that looks like this:

! LaTeX Error: File `multirow.sty' not found.

Type X to quit or to roceed, or enter new name. (Default extension: sty)

Enter file name:

In this case, LaTeX is trying to load a package named multirow but cannot find multirow.sty which is the file that contains the code for the package. To install missing packages, you can try the following things:

  • Try to Install Directly Using tlmgr:

    This is the "hope-you-get-lucky" approach and it works 90% of the time. Just open the command line and type:

    tlmgr install pkgname
    

    Where pkgname is the missing package that LaTeX was complaining about. In the example above, LaTeX complained about multirow.sty- the package name is the part before .sty so the command would be:

    tlmgr install multirow
    

    You can also use the TeX Live Utility. Open the application and click on the "Manage Packages" tab. Then:

    1. Enter the <pkgname> into the search field.
    2. Select the package in the main window.
    3. Click install.
  • Using tlmgr to locate a file:

    Sometimes, you type in the package name and tlmgr tells you package <pkgname> not present in package repository. or nothing shows up in the TeX Live Utility as a match for your search. In these cases, you may be dealing with a package that is part of a "bundle". A "bundle" is a group of packages that are known to tlmgr by a single name so that they will always be installed together. A good example is the pdflscape package.

    In this case the tlmgr comes to help again, as it allows to search the database for packages as well as files. If you are searching for a specific file, the best way is to use

    tlmgr search --file <filename>
    

    or in the previous case we would have

    tlmgr search --file pdflscape.sty
    

    which returns

    oberdiek:
      texmf-dist/tex/latex/oberdiek/pdflscape.sty
    

    The same can be achieved in the GUI started with tlmgr gui by selecting under Match only the filenames and enter the file name.

    The search command is very powerful and allows to search for package names, descriptions, file names, and also various taxonomies. A look into the output of the tlmgr help or in the GUI the Help -> Manual entry will teach many more things.

  • Using CTAN:

    Another way is to use the "Search the package descriptions" feature on CTAN to lookup the package name:

    Searching by package description.

    In this case searching for pdflscape bring up a few results- choose the one that matches the package name:

    Search results.

    Find the pkgname to use with tlmgr:

    Package info.

    For a bundled package, the correct name to pass to tlmgr install or put into the TeX live search box is the name that comes after /macros/latex/contrib/ in the "Location on CTAN" field. For the pdflscape package, oberdiek is the name of the bundle that contains it.

Missing Fonts

Coming soon.

3
  • 1
    I'd like to add a suggestion: when you can't find the missing package, check out the collection packages. For instance, I had trouble with a missing pzdr before, and the solution was to install collection-fontsrecommended.
    – LaC
    Commented Oct 26, 2012 at 9:23
  • 1
    To handle missing fonts try sudo tlmgr install collection-fontsrecommended .
    – asmaier
    Commented Jan 1, 2018 at 22:54
  • 1
    I think it's worth necro-ing this answer with an edit, to include texliveonfly's wonderful functionality.
    – SRSR333
    Commented Jul 24, 2021 at 9:13
20

This is really just a comment on Sharpie's answer, but I don't have the reputation to comment yet. If tlmgr install <pkg> doesn't work, try tlmgr search <pkg> as a way of automating the CTAN search (or tlmgr search --global --all <pkg>, if you really want to go wild). Here's a recent example that cropped up for me when trying to compile a file that contained \usepackage{epic}:

$ tlmgr install epic
...
tlmgr: cannot find epic
$ tlmgr search epic
 eepic - Extensions to epic and the LaTeX drawing tools.
6
  • 1
    @L Spice: please don't turn a comment into an answer just because you don't have the reputation for commenting yet. Not yet matching the requirement for one feature doesn't give a reason to misuse another feature instead. If you give some answers, you will soon get the commenting feature.
    – Stefan Kottwitz
    Commented Jun 15, 2011 at 18:32
  • 8
    I'm sorry about that. While it was morally a comment, it seemed to be useful enough as a separate answer to excuse the abuse. (I was very excited when I saw tlmgr search somewhere else—I'd somehow managed to miss it on every pass through the documentation—and was pretty sure that I'd forget about this question by the time that I had enough reputation for a comment.)
    – LSpice
    Commented Jun 16, 2011 at 2:44
  • 2
    +1 because I like your contribution. It would be great if you return to this topic soon, because Sharpies answer is CW and can be edited by everyone with at least 100 rep, so you can extend it then.
    – Stefan Kottwitz
    Commented Jun 17, 2011 at 6:43
  • 1
    I think the comment of @L Spice is really helpful and looks perfectly fine to me. It could be easily merged with the other one though. Still, I think it is a useful contribution, and that L Spice deserves some points for helping. Commented Apr 12, 2013 at 20:21
  • Just for the record, I have struggled a lot looking for texlive missing packages in the past, and probably so did many other users. Commented Apr 12, 2013 at 20:21
16

MacTeX is, as the other answer says, basically TeX Live with a few extras. The extras are things like TeX Shop, a Mac-only TeX editor. The reason TeX Live is so big is that there are a lot of LaTeX packages, and most have documentation in PDF format. It's actually this documentation that takes up a lot of the space. You can install only part of TeX Live, but the standard settings are to install everything. That's because everyone's requirements are different, and it would be very confusing if beginners were told 'load package xxx' and found that it was not installed, but was in TeX Live.

You can install TeX Live directly on a Mac, rather than downloading MacTeX. The later is Mac-like installer, whereas if you use the raw TeX Live installer you need to use the Terminal and acept that it is a Unix application. However, there is a small TeX Live installer that will download the packages you decide to install as the installation runs, and so can keep down the amount of downloading.

3
  • 2
    A little late, but you can also consider using texliveonfly, as described in this tutorial on installing BasicTex.
    – Neel
    Commented Apr 23, 2016 at 21:53
  • 1
    This is interesting as I have no use for the PDF documentation; I always search for documentation online anyway. If it's taking up the bulk of the space this seems like an easy fix. Is there a way to remove just the PDF documentation? Commented Mar 11, 2019 at 6:06
  • 1
    @user2428107 Yes, tlmgr can remove it but the versions you find online may not match the code you have installed
    – Joseph Wright
    Commented Mar 11, 2019 at 8:55
5

Little late to the party but if you want to easily install mactex with varying degrees of bloat you can use the package manager home-brew to install one of the following:

There are three versions of MacTeX.

Full installation: brew cask install mactex

Full installation without bundled applications: brew cask install mactex-no-gui

Minimal installation: brew cask install basictex

3
  • 4
    Welcome to TeX.se! Homebrew really just uses the MacTeX installer, so there's no real advantage of using it over the regular MacTeX or BasicTeX installers as suggested in the main answer.
    – Alan Munn
    Commented Aug 21, 2020 at 1:19
  • 1
    I could be wrong but I couldn't find the "mactex-no-gui" install on the mactex page. I just wanted the kitchen sink without the faucet. You could start with basictex and piece by piece build your way up to that but I am just lazy enough to not want to do that. Also thanks for the Welcome!
    – Octothorp
    Commented Aug 22, 2020 at 2:16
  • 1
    In the MacTeX installer you can choose customize to choose not to install the GUI apps. But they are 79 MB so in terms of space they add nothing. The bulk of the size of TL is in the documentation.
    – Alan Munn
    Commented Aug 22, 2020 at 13:17
3

You can also use an online LaTeX editor like ShareLaTeX which requires no installation

0
1

If the main concern is size, you can start with the essential packages by using the download links here http://www.tug.org/mactex/2009/morepackages.html

I would suggest that you also download "TeX Live Utility.app". It is a great tool for beginners. You can automatically search/download/update packages when you need them later using this graphical tool.

1
  • 3
    When you wrote this answer in 2010, the size was 1.8 Gigabytes, all answers given, and all possible justification for those might have sufficed then, but here in 2019, latex has grown by an additional 3 gigabyes and to about 90 minutes worth of CPU to install from source on a fast desktop pc or flagship macbook pro. Any answer except: "latex boils down to about 20 to 50 MB of useful code, with an additional 4.5 Gigabytes of hot dogshit", is insufficient at capturing the landfill fire that is modern latex. Latex is now the #1 most bloated piece of software in the modern world. Commented May 25, 2019 at 4:55
1

A nice alternative I found recently is https://tectonic-typesetting.github.io/en-US/. What tectonic does is that it is a standalone that will compile a given latex project taking care of downloading dependencies needed specifically for that project. So this way you never need to install a large latex distribution.

1

Have a look at TinyTex:

What is the size of TinyTeX? About 84MB on macOS and 66MB on Linux (gzipped), and 99MB on Windows (zipped).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .