I'm having trouble setting up vim-latex suite to produce .pdf files. Right now the \ll
(<leader>ll
) command will compile latex. Then \lv
(<leader>lv
) will produce a .dvi file.
Is there another command to initiate the standard .tex -> .dvi -> .ps -> .pdf build sequence?
Alternatively, can I configure \lb
to create .ps and .pdf files?
So far I have tried the following commands from the vim-latx documentation:
let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi'
let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'
However, this doesn't build ps or pdf file. I can still make them manually with dvips mydoc.dvi
and ps2pdf mydoc.ps
.
Best Answer
I would guess that you had
g:Tex_DefaultTargetFormat
set to its default value ofdvi
(at least for Windows/Unix according to the documentation).With
g:Tex_DefaultTargetFormat
set todvi
, compilation will follow the chain set byg:Tex_FormatDependency_dvi
rather thang:Tex_FormatDependency_pdf
which by default will only lead tog:Tex_CompileRule_dvi
being executed.In order to get the
dvi -> ps -> pdf
chain working, you would needlet g:Tex_FormatDependency_dvi = 'dvi,ps,pdf'
rather thanlet g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
so that when Vim-LaTeX tries to build advi
file (as it defaults to), it follows thedvi -> ps -> pdf
chain.or
g:Tex_DefaultTargetFormat='pdf'
rather thang:Tex_DefaultTargetFormat='dvi'
so it follows theg:Tex_FormatDependency_pdf
which you defined in the question to perform thedvi -> ps -> pdf
chain.For running
pdflatex
you should be able to just useg:Tex_DefaultTargetFormat='pdf'
withg:Tex_CompileRule_pdf
andg:Tex_FormatDependency_pdf
left to their defaults.