Ernesto Posse wrote:
Hi. I have a problem with LyX 1.4.2. under Windows. When using any of
the "update PDF" options in the View menu PDF viewers cannot update
the generated PDF, and some give an error. I found a "fix" in the LyX
wiki at

http://wiki.lyx.org/Windows/LyXWinTips

that suggests creating a PDFview.cmd script with the following code

if not exist "%~dpn1~%~x1" goto :go
pdfclose --file  "%~dpn1~%~x1"
del "%~dpn1~%~x1"
:go
copy %1 "%~dpn1~%~x1"
pdfopen --file "%~dpn1~%~x1"
exit

Try changing all instances of "%~dpn1~% to "%~dpn1-tmp%".

and putting this script as well as pdftools (pdfopen and pdfclose)
somewhere in the path, and then changing the associated viewer for PDF
from auto to PDFview.

 I've done all of these things, but it doesn't workl. I tried with
different PDF viewers (Acrobat, Foxit, eXpertPDF,)

I'm not positive, but I think this automatically uses whichever viewer is the Windows default for opening PDFs (Acrobat Reader on my system, and probably on yours).

and none of these
work: LyX fails to even launch the viewers, and there is not message
given. Even starting LyX from a console window doesn't show any
messages, even after adding an "echo something" at the beginning of
the PDFview.cmd, which suggests that LyX is not running PDFview.cmd,
but I am sure it is in the path. I even tried putting it in the
lyx/bin and in my ~/.lyx directory but to no avail.

My preference is to put the three files in a directory of their own, and put it on the LyX path prefix. That way, if I upgrade to a newer version of LyX, I just have to set the path and converter, and don't have to worry about reinstalling the files.


 Does anyone know whether this is a bug or if not, what to do to make
the update PDF options work under Windows?

It works fine for me. I think there are just small errors in your .cmd file. Incidentally, what you have is an accurate transcription of what is on the wiki, so apparently that was either recorded incorrectly or is out of date.

/Paul

Reply via email to