Your question is a good one, but reveals one of the fundamental flaws in the way Linux-like (and I include here MacPorts) package management systems work when it comes to TeX distributions. The problem is that packages (in the TeX sense) are qualitatively different from packages in the Linux sense, but the Linux packagers don't seem to recognize the distinction, and so you are left with a situation in which if you use a Linux-based distribution of TeX, you are usually left with no simple way to update the TeX packages.
The qualitative difference between a TeX package and a regular software package is that TeX packages are simple text files which are not compiled and in fact not executable. A regular software package, on the other hand is usually a compiled piece of software or a bunch of scripts. Now of course in a TeX distribution as a whole, there are definitely compiled binaries and scripts, but these are not the pieces that are updated so frequently as TeX packages since, generally they are updated only once a year anyway. But new TeX packages and updates to existing ones happen all the time, and TeXLive (and MikTeX) users have constant access to these updates.
So an ideal Linux-based package would install only the TeX binaries and support software, including tlmgr
and then allow tlmgr
to deal with the installation of the TeX packages, rather than have the Linux package manager do this. However, for reasons that are not entirely clear to me, this is not the route that Linux based systems have taken (thus leading to many outdated TeX distributions; Ubuntu is a known culprit in this respect.) Since this is not the case, most experienced TeX users install their own version of TeXLive and bypass the package manager; (see How to install "vanilla" TeXLive on Debian or Ubuntu?) similarly Mac users use the MacTeX distribution.
MacPorts does seem to be keeping up-to-date, but unless it recognizes the "TeX-package" vs. "Linux-package" distinction and actually installs tlmgr
I don't think there is a way to answer your question 2.2.
There is one possibility, I suppose: install both the MacPorts version and MacTeX and then make sure the TeX packages in /usr/local/texlive
are found even if the MacPorts binaries are used.
TeX Live from the Terminal/Command Prompt (Windows/Mac/Linux)
Understanding the TeX Live update scheme
If you have a TeXLive distribution (including MacTeX) there are a few things to understand about updating your system.
All TeX distributions consist of both binaries (including scripts) and packages (including classes). It is important to understand that for TeX Live these two parts of the distribution are effectively on separate update schedules, and this can lead to some confusion during the period in which the major updates of binaries is taking place.
The TeX Live binary part of the distribution undergoes a major update only once a year, while the packages can be updated constantly. This system, however comes at a cost: once a new binary version of TeX Live is available, package updates for the previous years are no longer available.
This means that if you have e.g. TeXLive 2011, you can update its packages roughly until TeXLive 2012 is created. After that point, your 2011 system will not be able to update any packages ever again using the normal package manager. (You can update individual packages manually via CTAN, of course.)
Major Updates
The major binary updates of TeX Live (which come out yearly) must be installed as if you were installing a fresh distribution. Since each version is installed in a folder named by its year, it's possible to have multiple distributions on the same system.
Package Updates
Once you have a version of TeX Live installed, you can update the packages as often as you like using the package manager tlmgr
. The simplest command is:
tlmgr update --all
which will update all packages that have changed since the last update.
If you want to see a list of the updatable packages without updating them, you can use
tlmgr update --list
Sometimes it's necessary to update the package manager itself, in which case you need to use
tlmgr update --self
It is also possible to combine options together
tlmgr update --self --all --reinstall-forcibly-removed
with the final option (--reinstall-forcibly-removed
) used as occasionally a package will become corrupted in one update and will therefore need to be reinstalled.
The Mac has a very nice GUI to the package manager called TeX Live Utility. See the MacOS answer for more details on that.
When is TeX Live "frozen"?
Once a year, the TeX Live packagers must "freeze" the system so that the latest version of the distribution (with new binaries) can be produced and tested. This means that there is a period during which tlmgr
will no longer be able to update the current year's distribution even though the new year's distribution is not publicly available. This freezing is necessary so that the new distribution can be guaranteed to work. Once the current year is frozen, it will never be able to be further updated. To keep up-to-date, you will need to install the next year's distribution when it becomes available. For additional information, see Why does TeX Live "require" yearly updates?
Administrator/root privileges
If you install TeX Live as Administrator/root, then you will also need to update with these privileges. On Windows, an Administrator-privilege Command Prompt is run by finding the Command Prompt icon in the Start Menu, right clicking to obtain the options and choosing 'Run as Administrator ...'. For Mac users, using sudo
will be sufficient as tlmgr
will be available on the path. This may not be the case in Linux distributions: see below.
Some notes on Linux "TeX Live" based packages
If you installed your TeX Live system using a Linux package manager (for example, apt-get
), then there is no guarantee that it will be updated on the same schedule as the regular TeX Live. In most cases the updates lag by some time, often years, depending on the particular version of Linux you are running. For this reason, most experienced TeX users who run Linux install the vanilla TeX Live distribution directly, bypassing their OS package manager completely. See How to install "vanilla" TeXLive on Debian or Ubuntu? for more information on this.
If you followed the directions in How to install "vanilla" TeXLive on Debian or Ubuntu? and installed TeX Live as root
then you will also need to run tlmgr
as root. You can do so (for example) by running sudo -s
from the command line, which will log you in as root
. Alternatively, you can run tlmgr
with the full path, for example on a 64-bit installation
sudo /usr/local/texlive/2011/bin/x86_64-linux/tlmgr
Another option is to change the ownership of the TeX Live directory, by using (something like)
sudo chown -R yourusername /usr/local/texlive/2011
after which you can run tlmgr
as a normal user (without sudo
).
When moving to a new version of TeXLive (e.g from 2011 to 2012) you may choose to remove the current installation you can use
tlmgr uninstall
(with sudo
if you haven't changed the permissions) and see the steps described in How to remove everything related to TeX Live for fresh install on Ubuntu? for example.
Best Answer
By far the preferred way to install TeX Live on a Mac is to use the MacTeX distribution. This installs everything you would need, and access to the TeX Live package manager (either through the command line or a very nice GUI TeXLive Utility) to keep everything updated. Although the initial install is huge, it will cause you far fewer problems in the long run.
If you truly need a small installation, MacTeX also provides the BasicTeX package, which is only 69 MB. Once you've installed that you can use either
tlmgr
or TeXLive Utility to install added functionality.Either of these routes is to be preferred over MacPorts, IMO, because MacTeX is always up-to-date with respect to TeXLive (because it is a TeXLive distribtion), and can be kept updated throughout the year with the package manager. Additionally, most Mac users will assume that's how your system is set up, so getting help will be easier.