[OS X TeX] Including jpg w/ graphicx
Ross Moore
ross at ics.mq.edu.au
Tue Nov 22 16:18:18 EST 2005
Hi Chris,
On 23/11/2005, at 7:59 AM, Christopher Allen wrote:
>> or it may be the ~ that isn't appropriate, in which case
>> it need to be the full path:
>> e.g.
>>
>> \graphicspath{{/Users/rossmoor/Pictures/}}
>
> \graphicspath{{Users/callen/Pictures/}} does something. It really
> doesn't like the \ before Users,
It is a forward-slash / not backslash \ .
This works perfectly for me.
Using ~ does not work at all -- presumably since the shell
that runs LaTeX doesn't expand the ~ when looking for files.
I'm using TeXshop with:
This is pdfeTeXk, Version 3.141592-1.11b-2.1 (Web2C 7.5.2)
Morten, what are you using, that does (?) give expansion of ~ ?
> which makes sense. Like with \string added before the ~ from above,
> I get a blank page if I include the bb= part of \includegraphics.
> If I leave it out, just using the viewport= part, I get
>
> LaTeX Warning: File `face1.jpg' not found on input line 5.
>
> Ugh. I'm confused and I feel like I'm wasting a lot of people's time.
Not too many, yet. :-)
Morten's suggestion of:
\expandafter\graphicspath\expandafter{\expandafter{\detokenize{~/
Pictures/}}}
requires an appropriate expansion for \detokenize .
That's rather technical to write, if you don't have it already.
Here's a way to trivially emulate ~ expansion:
\documentclass[letterpaper,10pt]{article}
\usepackage{graphicx}
{% restrict the re-definition of ~
\def~{/Users/rossmoor}
\xdef\myPictures{{~/Pictures/}}
}% returns ~ to normal, retaining \myPictures
\expandafter\graphicspath\expandafter{\myPictures}
\begin{document}
\includegraphics*[bb=0 0 67 75]{face1.jpg}
\includegraphics*[viewport=0 0 67 75,clip]{face1.jpg}
\end{document}
Adapt the user-name for yourself, of course.
>
> Thanks,
> Chris
Hope this helps,
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list