# tex-text problem

Darren Dale <dd55@...163...> writes:

The problem is that on windows, the TEMP environment variable is
something like 'C:\\Documents and Settings\\Darren\\Local
Settings\\Temp' or 'C:\\DOCUME~1\\Darren\\LOCALS~1\\TEMP', and
\includegraphics is not able to deal with filenames that have spaces
or tildes (this has been declared a feature, not a bug).

I don't have a Windows system to test on, but on a Mac the following trick
seems to deal with the tildes:

\documentclass{article}
\usepackage{graphicx}
\catcode\~11
\graphicspath{{/tmp/foo~bar/}}
\catcode\~13
\begin{document}
\includegraphics{stuff.pdf}
\end{document}

If I put stuff.pdf in /tmp/foo~bar, pdflatex (from TeX Live) finds it
just fine. Handling spaces seem to be a more difficult problem...

···

--
Jouni

Thanks Jouni, that was a creative suggestion. Unfortunately it doesn't work on
my windows laptop because dvips doesnt find the embedded file unless I either
run dvips in the directory containing the file to embed or I pass an absolute
path to includegraphics. I tried wrapping the \includegraphics statement with
the catcode shifts you suggested, but it didnt work.

Darren

···

On Tuesday 27 June 2006 09:14, Jouni K Seppanen wrote:

Darren Dale <dd55@...163...> writes:
> The problem is that on windows, the TEMP environment variable is
> something like 'C:\\Documents and Settings\\Darren\\Local
> Settings\\Temp' or 'C:\\DOCUME~1\\Darren\\LOCALS~1\\TEMP', and
> \includegraphics is not able to deal with filenames that have spaces
> or tildes (this has been declared a feature, not a bug).

I don't have a Windows system to test on, but on a Mac the following trick
seems to deal with the tildes:

\documentclass{article}
\usepackage{graphicx}
\catcode\~11
\graphicspath{{/tmp/foo~bar/}}
\catcode\~13
\begin{document}
\includegraphics{stuff.pdf}
\end{document}

If I put stuff.pdf in /tmp/foo~bar, pdflatex (from TeX Live) finds it
just fine. Handling spaces seem to be a more difficult problem...

Ok, usetex is going to do postscript processing in the user's current
directory, but only on windows. On other platforms, the work is done in a
temp directory. I've tested my changes on linux and windows, and committed
them to svn as of 2528. Feedback appreciated.

Darren

···

On Tuesday 27 June 2006 09:56, Darren Dale wrote:

On Tuesday 27 June 2006 09:14, Jouni K Seppanen wrote:
> Darren Dale <dd55@...163...> writes:
> > The problem is that on windows, the TEMP environment variable is
> > something like 'C:\\Documents and Settings\\Darren\\Local
> > Settings\\Temp' or 'C:\\DOCUME~1\\Darren\\LOCALS~1\\TEMP', and
> > \includegraphics is not able to deal with filenames that have spaces
> > or tildes (this has been declared a feature, not a bug).
>
> I don't have a Windows system to test on, but on a Mac the following
> trick seems to deal with the tildes:
>
> \documentclass{article}
> \usepackage{graphicx}
> \catcode\~11
> \graphicspath{{/tmp/foo~bar/}}
> \catcode\~13
> \begin{document}
> \includegraphics{stuff.pdf}
> \end{document}
>
> If I put stuff.pdf in /tmp/foo~bar, pdflatex (from TeX Live) finds it
> just fine. Handling spaces seem to be a more difficult problem...

Thanks Jouni, that was a creative suggestion. Unfortunately it doesn't work
on my windows laptop because dvips doesnt find the embedded file unless I
either run dvips in the directory containing the file to embed or I pass an
absolute path to includegraphics. I tried wrapping the \includegraphics
statement with the catcode shifts you suggested, but it didnt work.

Darren

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...163...
office: (607) 255-9894
fax: (607) 255-9001