Information:
Editor: (G)vim 7.3 + latex-suite for vim
OS: Windows XP sp3
tex distribution: Miktex 2.8
Viewer: Adobe Reader 9
Hi,
Does anyone know how to force gvim or miktex? to close the pdf viewer (Adobe Reader) automatically when a latex file is compiled? At the moment I have to close the viewer manually before compilation.
Kind regards,
Terp
Others ⇒ (g)vim - close viewer automatically
(g)vim - close viewer automatically
Have you considered switching to SumatraPDF for viewing, which not only doesn't lock the PDF, but would support SyncTeX forward/reverse search with gVim? (I.e., clicking a part of the PDF would bring you to the corresponding part of the code and vice-versa)? (Some info on this, and a patch for vim-latex to support this can be found here.)
If you're really intent on using Adobe Reader (which I think is a horrendous piece of software), I can think of only two ways to make this work: (1) an AutoHotKey script, which when called from Vim, switches to Adobe reader and kills it, then compiles the source, then reopens Adobe reader, or (2) have vim call the DDE command recognized by Adobe Reader to do the same (some details here). I'd investigate further myself, but I don't use Windows.
If you're really intent on using Adobe Reader (which I think is a horrendous piece of software), I can think of only two ways to make this work: (1) an AutoHotKey script, which when called from Vim, switches to Adobe reader and kills it, then compiles the source, then reopens Adobe reader, or (2) have vim call the DDE command recognized by Adobe Reader to do the same (some details here). I'd investigate further myself, but I don't use Windows.