Paul A. Rubin wrote:
Adrian M. Peter wrote:
I am trying to export my Lyx file to DVI on Windows. However, the
figures
are not appearing in the file. The YAP complains that the figure is
supposed to located in some Lyx temp directory under my local settings
folder. Is there a way to fix this? Why doesn't it just use the current
directory in which the figures are located? Thank you.
Which version of LyX are you running?
Probably could have saved myself the trouble of asking -- what you
described occurs in LyX 1.3.x but AFAIK not in 1.4.x. So one solution
would be to upgrade to 1.4.1. Alternatively, you can export the
document to LaTeX (which will contain the original file paths) and than
run LaTeX against it manually.
As to the why, when you convert a LyX document containing images to an
output format, LyX may convert some or all of the images to formats
other than their original ones, for compatibility with the desired
output format. For instance, DVI files can't digest PNG images, so LyX
will convert any PNG files to EPS format. The converted images reside
in the tmp directory while you're viewing the document. LyX 1.3.x
exports the LaTeX file it generated in the tmp directory, which contains
the paths to the converted images. The converted images, however,
evaporate when you close the document in LyX (and LyX deletes the tmp
directory).
In LyX 1.4.x, when you export your document, LyX also exports (to the
same directory) the converted images, and the exported document uses
appropriate paths. The exported image files have mangled names, though
(which match what's in the DVI export). On Windows, those names include
the path to the source file, and so it may be a bit of a (minor)
security hole to distribute the resulting DVI and images. For instance,
if your source directory was under "My Documents", the image file names
will include "Documents and Settings", "My Documents" and, most
importantly, your logon id.
/Paul