If you use some *nix, you can do what I did with a similar problem.
You may know that when you use more than one source file, you can
specify the main (lets say its foo.tex) file by creating an empty
foo.tex.latexmain file.
So just create this file, and put a string in it describing your change,
e.g. "beamer".
Then put something like this in your ~/.vim/after/ftplugin/tex.vim

if ( system("echo -n `cat *.tex.latexmain`") =~ 'beamer' )
        unlet g:Tex_FormatDependency_pdf
        let g:Tex_CompileRule_pdf = 'pdflatex -interaction=nonstopmode $*'
endif

This is very fragile (you should only have one latexmain file, it should
only contain this one word, it has to be in the directory where you
started vim, etc etc), but it works for me.
I know there are certainly are a lot of much more elegant ways to parse
a file though..


Martin
P.S.: why don't you use dvi for all you previewing and ONE call of
dvips/ pstopdf in the end when you want to print your doc?

On Sun, Jun 17, 2007 at 10:53:48AM +0800, anhnmncb wrote:
> hello list,
>         I prefer the way "dvi->dvips->pdf" to generate my ordinary document, 
> I find in this way the size of pdf i
> s small. But latex-suite compiles pdf using pdflatex by default, So I have to 
> set:
>         let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
>         let g:Tex_DefaultTargetFormat = 'pdf'
>         let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'
>         
>         When I prepare my slides using  beamer class, I prefer pdflatex to 
> latex because I find the graphics qual
> ity is higher than dvips. As you know, I have set the compilerule for pdf, so 
> I can't generate pdf using pdflatex
>  conventionally. I want to know how to resolve such problem?

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to