Andrea Moneti wrote:
I have two peculiar problems with exporting a document, which may be related:

1. when exporting to (or viewing) ps2pdf I get
   "An error occurred whislt running dvips -t a4 -o 'name.ps' 'na
(where the input filename is incomplete, but I don't think that's the problem) and to pdf output is produced. I note that upon checking in /tmp/lyx_tmpdir.../lyx_tmpbuf.../ I find no dvi file there.

Lack of a DVI file is certainly problem. Does the LaTeX log indicate any problems generating the DVI? (Probably not if the same document works with pdflatex, but I've learned not to jump to conclusions.) Can you view the document with View->DVI or export it to DVI successfully?

2. when exporting to dvi, I get in my working dir a temporary eps file corresponding to a figure in the document, but no dvi file. Shouldn't that file go into the lyx tmp dir? the same file is produced in the lyxx tmpdir when exporting to pdflatex

I'm not positive, but I think this is normal behavior. When exporting (as opposed to viewing), LyX generates the exported product in the work directory, including any necessary auxiliary files. If you are including an EPS image in a DVI file, the DVI file does not contain a copy of the image, just a reference to an external EPS file. So LyX puts both the EPS and DVI files in the work directory. In contrast, when you export to PDF, a copy of the image is embedded directly in the PDF, so only the PDF file (not the EPS file) needs to go in the work directory -- but a temporary copy of the EPS file is needed in the temp directory so that it can be embedded in the PDF output.

On the other hand, exporting (and viewing) to pdflatex works ok and it would be nice if there were a kbd shortcut for it.

I happen to agree; I use View->PDF (pdflatex) more often than I use View->DVI, since much of my work is in beamer presentations. In any event, you can create one yourself. Locate the bind file you use in the Resources/bind folder under the LyX installation directory, and copy it to the bind folder under your home directory. (If you are not sure which binding you are using, check Tools->Preferences...->Look and feel->User interface->Bind file.) Open it with a text editor, and at the bottom insert something like the following:

\bind "S-C-F" "buffer-view pdf2"

This would bind control-shift-F to View->PDF (pdflatex) on a Windows machine. I'm not sure, but I think Control on a Windows PC corresponds to the Command key (?) on a Mac. Anyway, pick a key combination not already in use. Also, it would be a good idea to check Tools->Preferences...->File formats to verify that PDF (pdflatex) is designated pdf2 on your machine. (That is the default, but it could hypothetically have been changed.)

Hope that helps,
Paul

Reply via email to