[OS X TeX] question: file path displayed in LaTeX figures

Jeffrey J Weimer weimerj at email.uah.edu
Mon Apr 2 21:57:33 EDT 2007


On Apr 2, 2007, at 8:16 PM, Thad Dunning wrote:

> I have been using TeXShop Version 2.09 and just downloaded and  
> installed Version 2.10beta8 (210) to see if I could sleuth out a  
> solution to the problem described below, but to no avail so far.   
> (I installed this version of TeXShop using the MacTeX-2007  
> Multiplexer available at Richard Koch's website, http:// 
> www.uoregon.edu/~koch/texshop/obtaining.html).
>
> The issue is that when I call .pdf files as figures or tables, the  
> path of the file is displayed below (and sometimes above) the  
> figure or table. This is disruptive, since the files are often  
> stored in sub-directories and the file names can be quite long.

Since you seem to use the paths frequently, try coding them in the  
preamble as such ...

\newcommand{\BookRoot}{/Users/td244/Desktop/Folders/Research/Crude  
Democracy/Book/}
\newcommand{\ChOne}{"Chapter One introduction"} % note the quotes to  
capture the space
\newcommand{\ChTwo}{"Chapter Two why this book"} % note the quotes to  
capture the spaces
...
\newcommand{\FigurePath}{}

... and put this after each \Chapter{} to set directory for figures ...

\renewcommand{\FigurePath{\BookRoot\ChFour /Data/"Master data set"/}

... and use this form of figure call ...

\includegraphics[]{\FigurePath figure4_1v2} % note NO .pdf extension  
is required!

I think \includegraphics also has something equivalent to a  
\setgraphicspath{...} command that overcomes this need, but I am not  
that well versed with it.

> In addition, the figures are not fully flush to the left (nor are  
> they centered). Instead, it looks as though the figures are  
> scrunched up to the right of the page. Part of the problem may be  
> that the path name below and to the left of the figure or table  
> seems to prevent the figure from displaying properly.

I suspect what you are seeing is an error that indicates, your figure  
has not been found. Instead, you are getting the "placeholder" for  
the figure, which is a small (blank) icon and the supposed filename.  
Try removing the .pdf extension from the filename in the  
\includegraphics call and using "" around text with blanks.  
Alternatively, remove the spaces from all your file and folder names  
(ie, /Data/Master data set/ becomes /Data/Masterdataset/, which is  
how it is processed by \includegraphics anyway).

Also, I presume you are typesetting through pdftex, not tex +  
ghostscript.

Hope this helps!

--
J. J. Weimer, Chemistry / Chemical & Materials Engineering
University of Alabama in Huntsville, MSB 125, 301 Sparkman Dr
Huntsville, AL 35899                phone: 256-824-6954



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list