From: Jay B. <bel...@tr...> - 2004-08-25 17:28:54
|
Ralf HEMMECKE <ra...@he...> writes: ... > The only problem that remains is the following. > It is now possible to say > > \begin{image}{dir/file} ... \end{image} > > and the picture file.png (or file.gif) will be generated in the > subdirectory 'dir', but only if 'dir' already exists. There is no code > at the moment, that would generate such a missing directory. It would be easy enough to have ps2image create the necessary directory, but another problem is that file.ps will be created as ./dir/file.ps. This would occur (in texfile.makeimage) before ps2image is called, and if htmldirectory isn't ".", then the png file will be htmldir/dir/file.png. So both directories ./dir and htmldir/dir would have to exist. It would be nice if file.ps were just ./file.ps, but the ps file name is made by TeX based on the image name dir/file, and I don't know how to (reasonably) strip off the directory name in TeX. For those who haven't looked at the TeX code recently, the TeX code itself creates a shell script to call dvips and ps2image to create file.png. The shell script looks roughly like dvips ... texfile.dvi > \im...@na... ps2image .... \im...@na... htmldirectory\im...@na...g The TeX command \image@name is given the value imagename from \begin{image}{imagename}. So if imagename contains a directory, the the ps file will be created in that directory relative to ".", but the png file will be put in that directory relative to htmldirectory. One possibility is to add the htmldirectory to the ps file name in TeX, and then, assuming that "hyperlatex texfile" is run before "hyperlatex -image texfile", have the necessary directories created by emacs. (I'm not sure how clear I'm being....) Jay |