Re: [Vim-latex-devel] Opening file with acrord in windows
Brought to you by:
srinathava,
tmaas
From: Aditya M. <adi...@al...> - 2004-05-20 23:29:56
|
>>> On May 20, Srinath Avadhanula wrote > On Thu, 20 May 2004, Aditya Mahajan wrote: > >> On May 20, Srinath Avadhanula wrote >>> I never really like acroread. It seems to lock the file so that you >>> cannot update the pdf file while its being viewed by acrord. That is too >>> much of a pain... >>> >> >> I managed to find the solution of both the problems in a single shot. >> fptex distributes pdfopen.exe and pdfclose.exe as part of its >> bin-pdftools package. What one can do is ALWAYS open a file with >> >> pdfopen --file filename.pdf >> > That seems like a useful tool. I'll take a look at it sometime. > > In the meanwhile, it looks like this... > >> closing transparent to me. So I tried something like this >> >> TexLet g:Tex_CompileRule_pdf = 'pdfclose --file $*.pdf & pdflatex -interaction=nonstopmode $* &pdfopen --file $*.pdf' >> >> but when the latex file has some errors, I do not see them in the >> error window. > > ...has an easy solution. What latex-suite does (via gvim's :make > mechanism) is to redirect the output of the Tex_CompileRule_pdf command > to a temporary file and then parse then according to the 'efm' setting. > Since you string a series of commands via cmd.exe's & mechanism, only > the output from the last command is piped to the temporary file. This > means that gvim is never able to see pdflatex's output. > > An easy fix is to do > > let g:Tex_CompileRule_pdf = > \ 'pdfclose --file $*.pdf & '. > \ 'pdflatex -interaction=nonstopmode $* & '. > \ 'pdfopen --file $*.pdf &'. > \ 'type $*.log' > This is brilliant and works perfectly. > (Why are you using TexLet? You should simply use :let to provide options > in either ~/.vim/ftplugin/tex.vim) I had just copied texrc to ftplugin/tex/texrc. I remember having read that somewhere a long time back. That is why I have TexLet rather than let:. Is this a bad idea? > > This basically prints the log file as the last command so that gvim is > able to see the output of pdflatex. (This is assuming pdflatex produces > a .log file like latex does). > This works perfectly. Thanks a lot aditya -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 |