[Tex/LaTex] Did I install a package successfully

installingpackagestikz-pgf

On my Ubuntu system, I have already installed texlive-full under /usr/share from long time ago.

I just tried a simple example with \usepackage{tikz} and it did work fine.

Later, I added \usetikzlibrary{intersections,positioning} to my LaTeX code in order to use the TikZ library intersections, but LaTeX complained about not finding it (if I remember correctly).

I didn't know much to do then, and just went to download PGF 2008-08-28. I unziped the archive and put it under ~/texmf/tex. Then latex did not report the previous complaint, but instead it complained about something like:

! Undefined control sequence. \pgfsetpath l.77
e[name intersections={of=line1 and line2}] (a) at (intersection-1)
{};
The control sequence at the end of the top line of your error
message was never \def'ed. If you have misspelled it (e.g.,
\hobx'), typeI' and the correct spelling (e.g., 'I\hbox').
Otherwise just continue, and I'll forget about whatever was undefined.

on the 77th line in the latex code:

\node[name intersections={of=line1 and line2}] (a) at (intersection-1) {};

The full code can be seen in a reply to my other post

So I was wondering if I have installed all the packages and libraries that I need? If not, how to do that correctly?

I guess my texlive-full installed long time ago under /usr/share might already have the PGF (although I am not sure). Is the one (PGF 2008-08-28) I just installed under ~/texmf/tex redundant?

Best Answer

Very probably you have an outdated version of TikZ/PGF installed. 2008 is already rather old and it might interfere with anything previously installed on your system. Indeed TikZ/PGF v2.00 (as shipped with TeX Live 2009 with Ubuntu 10.10) doesn't have the intersection library.

In the case of the code in your previous question, you could just calculate the points by hand (as in necessary for the labels anyway), e.g.

\node (a) at (2, 2.5) {};

Generally I recommend to not use the Ubuntu packages as they are often outdated and contain some bugs. Installing TeX Live manually is quite easy (if you want you can ask a separate question about that).

Related Question