Dear Francesco,

Thanks for the hint. Following your instructions I set the pdf/biber 
options in my .vimrc and placed the alternative options in the 
corresponding *.latexmain file. I first run for the ps/bibtex project 
ended up with a dvi only. After deleting all latex-related files another 
run correctly produced the ps. So your solutions seems to work. Thanks a 
lot.
Nevertheless, if somebody has an idea why the call of the appropriate 
function is not working as expected please let me know.

Best regards.

Andreas

Am 02/26/2014 11:24 AM, schrieb Francesco Montesano:
> Hi Andreas,
>
> This might work:
>
> Put your default settings (e.g. English) in your .vimrc (or
> ftplugin/tex) file.
> In the directory where you want you use the other language (e.g. German)
> create a
> main.tex.latexmain file [1] (I'm assuming that the main latex file is
> main.tex).
> Then put in main.tex.latexmain:
> set spell spelllang=de_20
> let g:Tex_DefaultTargetFormat = 'pdf'
> let g:Tex_BibtexFlavor = 'biber'
>
> This file is loaded after all the .vimrc and .vim/* files.
>
> I've used successfully this trick to compile with pdflatex specific
> projects, while keeping standard latex as default.
>
> Cheers,
>
> Fra
>
> ref:
> [1]
> http://vim-latex.sourceforge.net/documentation/latex-suite/latex-project.html
>
> ps: you might think about changing the spelllang only in the current
> buffer, in particular if you open different filetypes in the same session
>
>
>
> 2014-02-26 11:09 GMT+01:00 Andreas Groh <andreas.g...@tu-dresden.de
> <mailto:andreas.g...@tu-dresden.de>>:
>
>     Hi @ all,
>
>     I am using vim latex suite for a while an I am quite happy with how it
>     is working. I often have to switch between tex-projects in German (using
>     pdflatex with biber) and project in English (using latex with bibtex).
>     Hence, up to now I have to change the settings in my .vimrc before I
>     start working on another project. These are my settings:
>
>     "vim-latex plugin settings
>     set grepprg=grep\ -nH\ $*
>     let g:tex_flavor = 'latex'
>     let g:Tex_BibtexFlavor = 'biber' " use biber instead of bibtex
>     "let g:Tex_BibtexFlavor = 'bibtex' " using bibtex
>     let g:Tex_UseMakefile = 0
>     let g:Tex_ShowErrorContext = 0
>     let g:Tex_AutoFolding = 0
>
>     let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
>     let g:Tex_CompileRule_ps  = 'dvips -o $*.ps $*.dvi'
>     let g:Tex_CompileRule_pdf = 'pdflatex --interaction=nonstopmode $*'
>
>     let g:Tex_FormatDependency_ps  = 'dvi,ps'
>     let g:Tex_FormatDependency_pdf = 'pdf'
>
>     let g:Tex_MultipleCompileFormats = 'dvi,ps,pdf'
>
>     let g:Tex_DefaultTargetFormat = 'pdf'
>     "let g:Tex_DefaultTargetFormat = 'ps'
>
>     So before switching from a German to an English project a toggle the
>     comments for the Tex_DefaultTargetFormat and the Tex_BibtexFlavor (and
>     the spell checking options). Since this is quite inconvenient I thought
>     about defining two function which do the job. I added
>
>     :function German()
>     :       :set spell spelllang=de_20
>     :       :let g:Tex_DefaultTargetFormat = 'pdf'
>     :       :let g:Tex_BibtexFlavor = 'biber'
>     :endfunction
>     autocmd FileType tex :command! German :cal German()
>
>     :function English()
>     :       :set spell spelllang=en_gb
>     :       :let g:Tex_DefaultTargetFormat = 'ps'
>     :       :let g:Tex_BibtexFlavor = 'bibtex'
>     :endfunction
>     autocmd FileType tex :command! English :cal English()
>
>     to my .vimrc. When I am calling the function English the spell checking
>     and the bibliography settings are changed correctly. Even the default
>     format is changed (checked by calling :TTarget) but it is not working as
>     expected. After calling \ll a pdf file is still build, instead of a ps
>     file. Sometimes (until now I could find out under which circumstance) a
>     dvi is build, but not a ps like it should.
>
>     Any ideas what is wrong with my function definition? What do I have to
>     do in order to correctly change the default target from a function. Any
>     hint is appreciated.
>
>     Thanks and best regards.
>
>     Andreas
>
>
>
>     --
>
>     
> ------------------------------------------------------------------------------
>     Flow-based real-time traffic analytics software. Cisco certified tool.
>     Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
>     Customize your own dashboards, set traffic alerts and generate reports.
>     Network behavioral analysis & security monitoring. All-in-one tool.
>     
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
>     _______________________________________________
>     Vim-latex-devel mailing list
>     Vim-latex-devel@lists.sourceforge.net
>     <mailto:Vim-latex-devel@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/vim-latex-devel
>
>

-- 
------------------------------------------------------------------------
Andreas Groh                       phone : +49-351-463.34974
Institut fuer Planetare Geodaesie  fax   : +49-351-463.37063
Technische Universitaet Dresden    email : andreas.g...@tu-dresden.de
D-01062 Dresden, Germany           web   : tpg.geo.tu-dresden.de
------------------------------------------------------------------------

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to