[Tex/LaTex] Can’t find TikZ library calc


I am using a Mac operating system and am not a sophisticated programmer. I am trying to run code that uses the line \usetikzlibrary{calc} but I keep getting the error "I can't find file pgflibrarytikzcalc.code.tex". I am using TeXShop and have an up to date copy. How can I obtain and install this library? I need detailed instructions because I have been unable to figure this out using other posts.

Best Answer

From the pgf/TikZ ChangeLog file:

2008-01-26 Till Tantau

  • Modified calc library. Working on documentation.
  • Added calc library and ($...$) notation for coordinates.

So you need a version of pgf/TikZ which is of this date or newer. If your version is older, you need to update it. MacTeX, which is built on TeX Live, provides the TeX Live Manager for it. Start the manager GUI, or type in a terminal window:

sudo tlmgr update pgf

to update pgf/TikZ.