Ubuntu is my OS, and I have the Latex-Suite plugin installed.

I'm trying to get pdflatex to output a .pdf file instead of a .dvi file, but it continues to output only a .dvi file (along with .log and .aux files, which I realize are unavoidable). I am also trying to output to an existing ./test directory, which it is also failing to do. Here are my settings (I realize there are probably redundancies, I was pretty much just trying everything I could find):

  " Latex-Suite ----------------------------

" Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor = 'latex'

" Setting viewing rules based on document type
let g:Tex_ViewRule_dvi = 'xdvi'
let g:Tex_ViewRule_ps = 'ghostview'
let g:Tex_ViewRule_pdf = 'xpdf'

let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
let g:Tex_defaultTargetFormat = 'pdf'

let g:Tex_CompileRule_pdf = 'pdflatex --interaction=nonstopmode --output-directory=./test --output-format=pdf $*'

I'd appreciate any help (or letting me know if this question is better suited for the Latex StackExchange)!


Vimscript is case-sensitive. Typo in your vimrc:

let g:Tex_defaultTargetFormat = 'pdf'

should be

let g:Tex_DefaultTargetFormat = 'pdf'

Note: Does someone know a place in vim help which states explicitly that vimscript is case-sensitive?

  • Not in general, but the sections on functions and funcrefs mention some casing rules – D. Ben Knoble Jul 12 '19 at 16:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.