If you are using a TeX Live based distribution, such as MacTeX, I am aware of no "on-the-fly" installation of packages. This is a feature of the Windows-based MikTeX distribution.
ACUTeX may provide some functionality to remedy this- those emacs users are crafty. However I cannot speak authoritatively on the subject as I don't use emacs.
TeX Live does indeed have a package manager though- the command you want is tlmgr --help
for general usage notes and tlmgr install <pkgname>
to install a package. You may also want to check out the TeX Live Utility which provides a nice GUI for tlmgr
on OS X.
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.
Best Answer
You can use the
rsync
interface of the three main archive servers. Then use the correctrsync
option to only include.dtx
files:However, in my manually installed TeXLive2010 tree the DTX files are included.