Using vim with latex suite on two different computers, on one it's fine, but on the other my tikz pictures ''colapses'' (all text is put to the center of the figure, nothing is drawn) The same pc can compile fine from texstudio, but not from vim- latex suite

Edit: Seems the problem was compiling to dvi instead of pdf

  • Welcome to TeX.SX! It would seem strange that there would be an issue, can you check the top line of the log file after compiling with texstudio and vim-latex is identical. Potentially the issue is that texstudio and vim-latex are using different compile rules, either texstudio is doing multiple compiles while vim-latex only does one or different options are being called. Could you share the code (or a simplified version with the same issue) which causes this issue in the form of a minimal working example.
    – Dai Bowen
    Feb 12, 2017 at 23:11
  • Hi Dai, you were on spot with the compilers, i have no idea how to set up vimlatex, but just started using it (cannot use texstudio when ssh'ng into the university pc) But a friend set my laptop up for me, so i'll properbly just copy my .vimrc from the laptop Feb 12, 2017 at 23:16
  • Excellent, I suspect the lines you want are let g:Tex_DefaultTargetFormat='pdf' to run pdflatex straight off according to g:Tex_CompileRule_pdf which defaults to a value 'pdflatex -interaction=nonstopmode $*'. Probably you will also want let g:Tex_MultipleCompileFormats='pdf' for multiple compilations.
    – Dai Bowen
    Feb 12, 2017 at 23:27

1 Answer 1


Vim-LaTeX defaults to compiling first with latex and then following the dvi -> ps -> pdf chain (as per http://vim-latex.sourceforge.net/documentation/latex-suite/customizing-compiling.html). TeXstudio on the other hand likely uses pdflatex as the first choice.

Something seems to be going wrong when compiling to dvi and then processing things to reach the pdf, potentially there is a bug report to be made there if you fancy investigating it and are sure you have everything up-to-date.

Likely the solution you desire is simply to have Vim-LaTeX compiling with pdflatex from the off, this can be achieved with let g:Tex_DefaultTargetFormat='pdf' which will then call g:Tex_CompileRule_pdf for compilation (by default this does pdflatex -interaction=nonstopmode $*).

It is probably desirable to then add let g:Tex_MultipleCompileFormats='pdf' to take advantage of Vim-LaTeX's multiple compilation feature (in the same vein as texify or latexmk) to automatically do the necessary chain of compilations for bibliographies and the like.

  • Hi sorry for the long time before reacting (i mostly use my other pc for latex) Edit: didn't know how stackexchange comments work Feb 28, 2017 at 20:10
  • obivously still don't know how the comments work: wanted to add for people new to vim/vimlatex after adding the lines to your .vimrc you have to run :so % inside the .vimrc Feb 28, 2017 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .