Say, my .tex files are organized like this ~/Projects/proj_name/articles.tex
.
After compiling with LaTeX Suite, I want the output PDF file to be proj_name.pdf
instead of articles.pdf
. Since I have several projects in ~/Projects/
I want a systematic configuration in .vimrc
.
Here is my current solution
let g:Tex_CompileRule_pdf='pdflatex -interaction=nonstopmode -jobname=%:p:h:t $*'
This method is not satisfying since the name of .aux
and .bbl
are also changed to proj_name
while Vim-LaTeX is still looking for articles.aux
.
My question is, is there any other methods for doing this?
Best Answer
I know this is an old question but I ran into the same problem as the OP and had to solve it.
As a note to other users: the OP's "current solution" does not work well because latex-suite checks the aux and bbl files with the same name as the tex file to see if it needs to run bibtex or recompile the pdf; it won't find them, since the command used also names these files according to the jobname. Hence it never runs multiple compilations to get the bib.
That said, I found no easy solution so here is a shell script I use as the new compile rule (e.g. named tex2pdf):
Then use this as the compile rule: