Georg Baum wrote:

> Yesterday evening I played a bit with weird filenames and
> \includegraphics.

Georg, this is awesome!

> Works mean that latex runs without error and writes the correct filenames
> into the .dvi file. It seems that dvips is a bit behind and does not
> understand quoted filenames.

Yes, I say this last night. pdflatex generates valid pdf files though.

It's possible that a wrapper to dvips could get around this problem. Check 
out DTL (http://www.ctan.org/tex-archive/dviware/dtl/)

It contains the utilities dv2dt and dt2dv to convert a DVI file to and 
from a human readable format. For example:

\documentclass[a4paper]{article}
\usepackage{graphicx}
\begin{document}
\section{This in insetgraphics}
\includegraphics{sub\string~dir/im\string~ge.eps}
foo
\end{document}

dv2dt reports that the DVI file for this contains the entry:

special1 61 'PSfile="sub~dir/im~ge.eps" llx=0 lly=0 urx=20 ury=20 rwi=200 '

I wonder if quoted filenames contain extra quotes? If so, something like:

$ dv2dt infile.dvi | sed -f remove_quotes.sed | dv2dt -si -so > outfile.dvi

might clean up the .dvi file, for some definition of remove_quotes.sed.

> It is awful: Different characters need different workarounds, and for
> some (e.g. {}) I could not even find workarounds.

Truly disgustin'. However, this could (almost) all be hidden behind a 
latex_path() function.

> Feel free to play with this, I don't have the time at the moment, but
> will probably complete it next week or so if it is still needed then.

Let's get the basic code in place first. The contents of latex_path can 
then be modified at our leisure.

-- 
Angus



Reply via email to