# Why will pinlabel not find a fig.pdf when using pdftex?

I have just discovered pinlabel, and would like to use it to add labels to my figures.

I am using Adobe Illustrator to create my figures: I have a Mac, and with the latest OS, it seems hard/impossible to install xfig. I am using TeXShop and I would prefer to use pdftex to LaTeX my file, so I use AI to create a PDF figure.

The trouble is, when I add a pinlabel label to my figure, I get the error that the .ps or .eps file cannot be found. Colin Rourke's instructions for pinlabel indicate that when using pdftex, it will automatically search for a .pdf figure file, which clearly it is not.

Here is a sample of TeX which I am using. The sample figure is available here:

http://www.math.cornell.edu/~tsh/math/cropped-C3-example.pdf

\documentclass{amsart}
\usepackage{graphicx}
\usepackage{pinlabel}
\begin{document}
\begin{figure}[ht]
\labellist
\small\hair 2pt
\pinlabel $(0,0)$ at 160 190
\endlabellist
\centering
\includegraphics{cropped-C3-example}
\caption{We are interested in the shaded region.}
\label{fig:C3}
\end{figure}
\end{document}


If I comment out the lines from \labellist to \endlabellist, pdftex will produce a perfectly fine figure. With those lines, I get the error

Has anyone else had this problem? Have you found a solution?

-
It compiles fine here... –  karlkoeller Aug 9 '13 at 17:39
On Linux/TeXLive 2013, it compiles without those errors to give this output like @karlkoeller –  texenthusiast Aug 9 '13 at 19:56
I have found the embarrassing solution. Mac does not have pinlabel.sty installed. The strange thing is that TeX did not complain, which it usually would if it does not have a package. Putting pinlabel.sty into the same folder as my .tex file worked like a charm. –  Tara Holm Aug 9 '13 at 23:40

If you're willing to use TikZ instead of pinlabel, here's a solution. The commented out line draws a help grid on top of your image so you can see where to put your node.

I couldn't get the pinlabel to work, and saw the error you mentioned.

\documentclass{amsart}
\usepackage{tikz}
\usepackage{graphicx}

\begin{document}

\begin{figure}[ht]
\begin{center}
\begin{tikzpicture}

\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics{cropped-C3-example.pdf}};

%%\draw[help lines] (0,0) grid (8,8);

%% This is done by drawing a label above and right
%% of the vertex you're labeling, rather than giving
%% the coordinates of the label itself.
%% Alternately, if you wanted to position the label
%% yourself, you could use a command like:
\node[label=above right:{$(0,0)$}] at (1.6,3.6){};
%%
%% \node at (2.2,4.1){$(0,0)$};
%%
\end{tikzpicture}

\end{center}
\caption{We are interested in the shaded region.}
\label{fig:C3}
\end{figure}

\end{document}

-

I see Tara found a solution, but for everyone else who's googling this:

I had the same error report with pinlabel installed. Instead of not complaining that pinlabel wasn't installed, my windows installation of MikTeX wasn't complaining that I was using version 1.1. I would also get the error if I put a copy of pinlabel.sty in the same folder as my tex file. On top of that, for some reason the MikTeX updater was not detecting my outdated pinlabel.sty. The pinlabel documentation says 1.2 is required for pdf images.

I found version 1.2 at http://www.ctan.org/pkg/pinlabel, put it in the same folder as my tex file (no admin privileges at UGA), and it works. So make sure you're using 1.2 if you have pdf images.

-