[Vim-latex-devel] Opening file with acrord in windows
Brought to you by:
srinathava,
tmaas
From: Aditya M. <adi...@al...> - 2004-05-20 04:12:40
|
Hi, In windows, there is a problem re-viewing the pdf file in Acrord. To reproduce this problem, write a sample latex code, set output format to pdf (:TTarget pdf) and compile the file. Then open the file by \lv Acrobat Reader is launched and the file shows correctly. Now close the file in Acrobat Reader (Do not close the reader!) and from within vim, try viewing the file again by \lv. Acrobat gives an error saying "There is an error opening the document, the file could not be found" 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 Acrobat Reader will give the same error. It can locate the file if the complete file path is mentioned. So one needs to modify latex-suite/compiler.vim as follows 259: let mainfname = Tex_GetMainFileName(':p:r') 262: let mainfname = expand("%:p:r") 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. Aditya -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 |