----- Original Message -----
From: "Paul A. Rubin" <rubin-mhe/[EMAIL PROTECTED]>
Newsgroups: gmane.editors.lyx.general
Sent: Monday, August 15, 2005 3:31 PM
Subject: Re: Problem viewing PDFs
Hi there
I just installed LyX 1.3.6 for Windows.
When I select View->PDF (any of the three versions), acrobat reader
gives an
error saying that it can't open the document. The file is generated in
the
temp dir, but probably the path is being passed wrong. How can I fix
it?
Thanks
Best regards,
Gustavo Guerra
PS: With this new instaler, I still have to install the fonts given on
the
wiki site(ftp://ftp.lyx.org/pub/lyx/contrib/BaKoMa4LyX.zip), or does
the
installer include them.
Firstly the fonts, yes you do have to install them seperately.
Secondly with the pdf problem. Is Acrobat open at the time, if so close
it, then select view pdf.
Yes, closing acrobat first solves the problem. Thanks.
It's still a weird behaviour, though, having to keep closing acrobat. Is
it a bug in acrobat?
Best Regards,
Gustavo Guerra
Windows does not handle pipes very well, certainly not as well as Unix and
its derivatives do. I'm inclined to blame Windows rather than Acrobat
Reader.
There's a workaround of sorts. Manually edit your preferences file
(should be in C:\Documents and Settings\<your login id>\Application
Data\lyx), adding the following line:
\custom_export_command "acrord32 $$FName"
This assumes that you have the path to Acrobat Reader on LyX's path
prefix. Close and restart LyX if it is open when you make the change. Now
instead of using View->PDF (or either of the PDF alternatives), use
File->Export->Custom, pick the PDF format you want, and click ok. The
export command should already be filled in. For whatever reason, this can
display the document in an already running copy of Acrobat Reader.
One thing this does not fix: there is no way to use View->Update->PDF to
view changes while the previous version of the document is open in Reader.
Again, I think the fault lies with Windows: while you're displaying the
previous version, Windows puts a read lock on the file in the temp
directory, so the updated version (which uses the same file name) cannot
overwrite it.
Paul
Is this workaround useful for this situation?
http://wiki.lyx.org/LyX/LyXWinTips#pdfwiew
Improved PDF viewing
This tweak makes the View PDF (pdflatex) command open the viewer window
automatically and avoids the error message that occurs if you invoke View
PDF (pdflatex) with the opened reader. Other viewer windows will remain
unaffected.
Assuming that you have the Acrobat or Acrobat Reader installed, do the
following:
Download pdftools and extract pdfopen.exe and pdfclose.exe into your
~\Lyx\bin directory. Create a text file PDFview.cmd containing
if not exist "%~dpn1-tmp%~x1" goto :go
pdfclose --file "%~dpn1-tmp%~x1"
del "%~dpn1-tmp%~x1"
:go
copy %1 "%~dpn1-tmp%~x1"
pdfopen --file "%~dpn1-tmp%~x1"
exit
in the same directory.
In Edit ? Preferences ? File Formats ? Viewer replace the viewer for PDF
(pdflatex) by PDFview, click Modify and Save.
If you select View ? PDF (pdflatex), this will show the current document as
a PDF. The error that you get if the Reader is already open will be avoided,
but the file will be named slightly differently to achieve that result.