TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

\includegraphics[clip=true, trim=0 170 0 170, width=0.33\linewidth, angle=0]{images/filename.pdf} 

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.

share|improve this question
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
up vote 5 down vote accepted

Shortly after posting this question I found out that a symbolic link is not the same as an alias and tried using a symbolic link.
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  
ln -s ~/Matlab/filename.pdf filename.pdf

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

share|improve this answer
Yes; only applications using the user interfaces provided by Mac OS X can profit of Finder aliases. TeX Live programs know only about symbolic links, and Finder aliases are a very different thing. – egreg Mar 31 '13 at 19:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.