# How do I install TikZ on a MacBook?

I have no knowledge of programming...

I have a MacBook OS10.6 with Tex Shop, updated...

after placing the zipped file into `/Users/myname/Library/texmf/tex` folder,

I open terminal in utilities and type `texhash`...this is what I get...

``````Last login: Tue Feb 15 12:31:42 on console You have mail.
anns-macbook:~ ann\$
anns-macbook:~ ann\$ texhash
texhash: /usr/local/texlive/2010/../texmf-local: directory not writable.
Skipping... texhash: /usr/local/texlive/2010/texmf: directory not writable.
Skipping... texhash: /usr/local/texlive/2010/texmf-config: directory not writable.
Skipping... texhash: /usr/local/texlive/2010/texmf-dist: directory not writable.
Skipping... texhash: /usr/local/texlive/2010/texmf-var: directory not writable.
Skipping... texhash: Done.
``````

Any ideas, I can't use the `pgf` library in TeX Shop since TeX Shop can't seem to find the library in the folder structure I've created

-
You need to call texhash as `root` (no idea how to do that on a mac) –  Caramdir Feb 15 '11 at 19:09
@ann. You seem to have TeX Live 2010 installed (or perhaps MacTeX 2010). It includes Tikz already: you should not need to add it. –  Joseph Wright Feb 15 '11 at 19:11
When you say that you have TeXShop, do you mean that you have MacTeX: tug.org/mactex ? If so, then you should be able to run the "TeX Live Utility" (found in `/Applications/TeX`) to install PGF (and TikZ) if they're not already installed. –  las3rjock Feb 15 '11 at 19:15
As for your specific problem, you do not ordinarily have write permissions in `/usr` in Mac OS X, so you need to use `sudo texhash` instead of `texhash` (which is essentially what Caramdir is suggesting that you do). –  las3rjock Feb 15 '11 at 19:18
For what it's worth, the current version of PGF/TikZ on my MacTeX 2010 install (updated through the TeX Live Utility) is 2.10. –  las3rjock Feb 15 '11 at 19:55

To summarize what we've learned today:

1. It is by far easier to keep MacTeX packages up-to-date by using the TeX Live Utility than by manually installing packages into `~/Library/texmf` (`~` is UNIX shorthand for the user's home directory, which is `/Users/username` in Mac OS X).
2. (La)TeX commands, like most other computer commands, need to be invoked in exactly the right form. Simple typos (extra letters, missing letters, unmatched curly braces, etc.) can cause major headaches! In this case, `\usetikzlibrary{mindmaps}` (plural "mindmaps") is not the same as `\usetikzlibrary{mindmap}` (singular "mindmap").
-
this is not really an answer, I think. Some bits are also inaccurate (you don't need `sudo texhash` to hash `~/Library/texhash`, only to hash `/usr/local/texmf`. And indeed you don't need to hash `~/Library/texhash` at all with TeX Live 2010.) –  Joseph Wright Feb 15 '11 at 21:22
@Joseph: It's just point 2 that's inaccurate, yes? Specifically, the lack of administrative privileges was responsible for the error messages that ann reported, but the underlying problem was trying to use a TikZ library that doesn't actually exist. –  las3rjock Feb 15 '11 at 21:33
yes, that's the case –  Joseph Wright Feb 15 '11 at 21:39

Okay, maybe my problem isn't what's installed but how I am using MacTex to generate a typeset...

When I begin a document as:

\documentclass{minimal} \usepackage{tikz} \usetikzlibrary{mindmaps}

I think the problem here is that you should be using `\usetikzlibrary{mindmap}` instead of `\usetikzlibrary{mindmaps}`. –  las3rjock Feb 15 '11 at 20:59