[XeTeX] xelatex does not find pdf graphics ?

Michael Gedalin gedalin at bgumail.bgu.ac.il
Wed Sep 22 10:32:13 CEST 2004

>> pdftex and latex look first for files residing in the current
>> directory, then in ~/Library/texmf/(subdirectories), and in the end in
>> the tetex tree. If you use the Gerben Wierda's tetex distribution
>> (i-Installer), the description of the search algorithm is in the file
>> /usr/local/teTeX/share/texmf.gwtex/README.howtexfindsfiles.txt.
>> Graphics files are searched in the same way as all other files (tex,
>> sty, fd, tfm, etc.). This is very wise, since at allows to make
>> site-wide files (including graphics) which could be put in various
>> directories and used without any necessity to remember where they are
>> (if one wishes he/she can see the exact location during  typeset of
>> look in a .log file).
> This is "wise" only if you are never going to use these images in any
> other way
> than that for which you set them up.
> For example, if you want to share a document with someone else, so that
> they
> cam typeset it too, then now you have to
>   a.  go and find those images;
>   b.  send a complicated archive with several directories or levels of
> directory; or
>   c.  write instructions on where to put the images; and
>   d.  perhaps document your source with extra comments about how to 
> find
>       the missing images when they've not been installed correctly.
> The  \graphicspath  command is a much better way to do it.
> It can be made even better still using symbolic linking on your
> Mac OS X (or other Unix) platform.
> e.g.
>    use  \graphicspath{{figures/}}
> where figures need not be a directory per se,
> but a symbolic link to where you keep those images.
> Make the link using:
>      ln -s  path-to-figures-location  ./figures
> on a command-line at the correct working directory.
> To send the whole TeX project to someone else, you can
> create a  tar-archive  using the  -h  switch to  tar .
> This causes symbolic links to be followed, so that the
> archive will contain the actual image-directory's contents,
> rather than just place a link to a directory.
> ( -dereference  is the same as  -h  for  tar )
> This gives you more flexibility than what you seem to be
> asking for, with none of the drawbacks; i.e. the best
> of all possible worlds --- with the proviso that you
> are prepared to use the command-line a little bit.
> Hope this helps,

Not especially. What you are saying is applicable to local .sty files 
too, and, in general, for everything you make locally to be used in 
\usepackage, \include, or \input, and is designed for multiple usage in 
many different documents. For example, I use a pdf graphics file for my 
letterheads in all letters. If I need another letterhead I would make 
it and put in a directory named, say, myletterheads. I am planning to 
write lectures notes. I teach more than  one course, and I would 
probably like to be able to share some figures for various courses. On 
the other hand, I would prefer to have these figures sorted by contents 
and not by the necessity to adjust myself to graphicspath. In other 
words, I am going to have mechanics_figs, plasma_figs, etc. It is much 
much more efficient to be able to just drop these directories into my 
local tree  than to change every now and then the path or link.

As for sharing with others, I do not see how a path or link can make 
one's life easier. I do not see any problems in sending necessary files 
over email, or enabling guest ftp, or putting on a web server (even 
with private access). I did all these, and this is even faster than 
tar+gz+ whaever is needed (uuencode some time ago). If I send to 
somebody, I see no problem in finding the graphics files (using Find or 
locate if you prefer command line tools). Unless I put \graphicspath 
instructions in my tex file I do not need to send "a complicated 
archive with several directories or levels", nor
"document my source with extra comments about how to find  the missing 
images". The latex ability to find necessary files without specifying 
path in the tex file if a great advantage. Of course, one can always 
use your method, but that should not come instead.

> *******************************************************
*Michael Gedalin
*Department of Physics
*Ben-Gurion University
*POB 653
*Beer-Sheva, 84105
*Tel: 972-8-6461645
*Fax: 972-8-6472904
*Email: gedalin at bgumail.bgu.ac.il

More information about the XeTeX mailing list