# Include image by pointing to alias

For my document I have an image folder that holds my images. For this example I will assume the following situation:

Original image path: ~/Matlab/filename.pdf
Image folder path: ~/Latex/images
Alias to image: ~/Latex/images/filename.pdf

I want to include the image by pointing to the alias of the image. In this way the image will be updated when Matlab updates filename.pdf in the ~/Matlab folder. I've tried it as follows:

\begin{figure}[!htpb]
\centering
\includegraphics[clip=true, trim=0 170 0 170, width=0.33\linewidth, angle=0]{images/filename.pdf}
\caption{CAPTION}
\label{fig:}
\end{figure}


However, TexShop (I'm on a Mac) does not like this and produces the following error:

!pdfTeX error: /usr/texbin/pdflatex (file ./images/mountdiff.pdf): xpdf: reading PDF image failed
==> Fatal error occurred, no output PDF file produced!


How can I link to the file in the Matlab folder, without typing the whole path in the \includegraphics line. Typing the whole path is undesirable as it is much longer than the example suggests.

-
What do you mean with "alias to image"? It should be a symbol link (shell command line: ln -s ~/Matlab/filename.pdf ~/Latex/images/filename.pdf). – Heiko Oberdiek Mar 31 '13 at 19:23
Thank you @HeikoOberdiek Shortly after posting this question I found this out. But with alias I mean the file you get when you rightclick on a file and press Make Alias. Or when you hold opt+cmd during dragging. – Saaru Lindestøkke Mar 31 '13 at 19:27

I've made a symbolic link in ~/Latex/images to the file in ~/Matlab by using SymbolicLinker (I'm not affiliated in any way). A symbolic link can also be made in Terminal as follows (file/folder names as given in the example):
cd ~/Latex/images

Then images/filename.pdf can be used regularly in \includegraphics.