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
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to