On Fri, Jul 11, 2008 at 05:55:31PM -0400, Paul A. Rubin wrote:

> This came up on the user list.  I'm not sure if it needs to go into 
> bugzilla, so I'm looking for opinions.  (I didn't find this in either 
> bugzilla or the wiki.)
> 
> On Windows, user specifies PDF (pdflatex) viewer as acrord32.exe.  View 
> -> PDF (pdflatex) runs pdflatex, but no Acrobat Reader window opens. 
> Task Manager shows a copy of AR running (and eating a lot of CPU cycles) 
> but without a window.  You have to kill it.  Turns out the problem is 
> that LyX is passing the path to the file as "C:/whatever", nicely 
> wrapped in quotes to preserve spaces but with Unix-style (maybe I should 
> say real-world style) path separators.  If you intercept the path and 
> reverse the separators, things work ok.
> 
> The easiest workaround, assuming the user wants AR to be their PDF 
> viewer, is to put it on the system path and use 'auto' as the viewer. 
> Maybe the best solution is to put that on the wiki?  I'm a bit leery 
> about things that innocently can create windowless CPU-gulping children, 
> though.
> 
> Thoughts?

This one seems to be another Windows idiosyncrasy. I had already
observed a strange behavior with permissions. For example, ttf
fonts are ignored if they don't have the executable bit set.

In this case, it seems there is some other strange problem with permissions,
rather than the use of '\' or '/' as path separator. I did the following
test. Started lyx and previewed a new file through "View->PDF (pdflatex)".
The file was shown in AcroRd32. Then, without quitting lyx, I tried to
view the very same file through the command

$ AcroRd32.exe "C:/tmp/lyx_tmpdir848a00800/lyx_tmpbuf0/newfile1.pdf"

AcroRd32 ran and was consuming cpu cycles, but nothing showed up. I killed it.
Now I did:

$ mv "C:/tmp/lyx_tmpdir848a00800/lyx_tmpbuf0/newfile1.pdf" 
"C:/tmp/lyx_tmpdir848a00800/newfile1.pdf"
$ AcroRd32.exe "C:/tmp/lyx_tmpdir848a00800/newfile1.pdf"

and AcroRd32 hung again. However, after

$ mv "C:/tmp/lyx_tmpdir848a00800/newfile1.pdf" "C:/tmp/newfile1.pdf"
$ AcroRd32.exe "C:/tmp/newfile1.pdf"

AcroRd32 came up showing the file.

So, there's something in the permissions of the lyx tempdir preventing
AcroRd32 from showing the file when using '/' as a separator.
Instead, why it indeed works when using '\' really escapes me.
I had already stopped trying to find rational explanations about Windows
behavior long ago.

-- 
Enrico

Reply via email to