[Tex/LaTex] Update TikZ/PGF on mac

best practicestexlivetikz-pgfupdating

the TeXLive 2012 distribution on my Mac is shipped with TikZ version 2.10 – I want to use (try) the CVS (most updated beta(?) version). Here's what I've done so far:

  1. Downloaded the the TDS package
  2. Extracted the package into /Users/username/Library/texmf/tex/generic/
  3. Added /Users/drorata/Library/texmf to my TEXMFLOCAL variable
  4. Ran texhash.

These steps indeed installed the newer version in my HOME directory, but not nicely. For example, running texdoc tikz, opens the manual of the older version. My question is how can I update TikZ properly?

In addition, how can I revert to the old version? Currently I can revert by moving the CVS version from the location specified above and run sudo texhash.

I guess this question is relevant for all TeX packages, so if this is the case, a general solution will be the best.

Best Answer

If your TeXLive 2012 distribution for Mac OS X is MacTeX 2012, you should get a usable CVS version of TikZ/PGF with only two steps:

  1. Downloaded the TDS package.

  2. Extract the package into the root directory of a TDS tree used by your distribution. For example with MacTeX: /Users/<username>/Library/texmf/.

/Users/<username>/Library/texmf/ is the user's TDS tree and, by default, there is no need to call mktexlsr (texhash is an old name).

To remove this CVS version, delete the following directories (where . is your TDS directory):

  • ./source/latex/pgf
  • ./doc/generic/pgf
  • ./doc/pgf
  • ./scripts/pgf
  • ./tex/generic/pgf
  • ./tex/generic/pgf/graphdrawing/lua/pgf
  • ./tex/latex/pgf
  • ./tex/context/third/pgf
  • ./tex/plain/pgf

Note: To get the latest complete version of TikZ, see my answer to How to install a current version of TikZ?