Re: [Vim-latex-devel] Opening file with acrord in windows
Brought to you by:
srinathava,
tmaas
From: Aditya M. <adi...@al...> - 2004-05-20 20:21:38
|
>>> On May 20, Srinath Avadhanula wrote > On Wed, 19 May 2004, Aditya Mahajan wrote: > >> It turns out that the error occurs because acrobat reader does not >> recognize the directory from which it was launched. This is easy to >> see. CD to a directory having a pdf file, say test.pdf and on command >> prompt type >> acrord32 file.pdf > > This is pretty strange. On my system (windows XP + Adobe Acrobat Reader > 5.0), if I have the reader open (but without the file) and if I issue > a command like > > AcroRd32 file.pdf > > from a command prompt after cd'ing to the directory containing the file, > Acrobat does correctly launch the file... > I also found this to be strange. In my system (Windows XP + Acrobat Reader 6.0) when I cd to a directory containing a pdf file and issue a command acrord32 file.pdf acrobat reader correctly shows the file. Now if I close the file (without closing acrobat reader) and again issue the same command on the command prompt acrord32 file.pdf I get an error saying "There was an error opening the document. The file cannot be found". I have tested this on three systems, all windows XP and acrobat reader 6.0. Maybe this is a bug that crept into acrobat reader in the latest version :-( >> Note that I have changed "%:p:t:r" to "%:p:r" so that mainfname points >> to the complete path of the file. >> >> Now \lv calls >> :!start Acrord32 "complete_path_to_file/file.pdf" >> and the file shows correctly. Also the filename is surrounded with >> quotes, so everything should be fine. >> > > Unfortunately, there are a LOT of issues when doing this. For one, > enclosing the file name in quotes doesn't work on some systems when the > the actual shell command is interpreted by bash or similar which quotes > the command... Escaping on the other hand works in *nix but not on > windows... > How about something like if has('win32') something else something else endif I know that this will unnecessarily complicate the code. So if you do not want to include it in the main branch, I will simply make a change in my local files. Aditya |