Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

Commit

Permalink
support for bibtex compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
donRaphaco committed Oct 17, 2017
1 parent e5731e7 commit ca7ab59
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ftplugin/tex.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ if !exists('s:neotex_loaded')
let s:neotex_loaded = 1
endif

let b:neotex_jobexe=''

if get(g:, 'neotex_latexdiff', 0)
let b:neotex_jobexe .= 'latexdiff '
if exists('neotex_latexdiff_options')
Expand All @@ -31,12 +29,17 @@ if get(g:, 'neotex_latexdiff', 0)
let b:neotex_jobexe .= fnameescape(expand('%:t')) . ' ' . s:neotex_buffer_tempname . ' > ' . s:neotex_preview_tempname . ' && '
endif

let b:neotex_jobexe .= 'pdflatex -shell-escape -jobname=' . fnameescape(expand('%:t:r')) . ' -interaction=nonstopmode '
let s:neotex_pdflatex_cmd = 'pdflatex -shell-escape -jobname=' . fnameescape(expand('%:t:r')) . ' -interaction=nonstopmode '
if exists('neotex_pdflatex_add_options')
let b:neotex_jobexe .= g:neotex_pdflatex_add_options . ' '
let s:neotex_pdflatex_cmd .= g:neotex_pdflatex_add_options . ' '
endif

let b:neotex_jobexe .= s:neotex_preview_tempname
let s:neotex_pdflatex_cmd .= s:neotex_preview_tempname
let b:neotex_jobexe = s:neotex_pdflatex_cmd

if get(g:, 'neotex_bibtex', 0) && filereadable(expand('%:r') . '.bib')
let b:neotex_jobexe .= ' && bibtex ' . fnameescape(expand('%:t:r')) . ' && ' . s:neotex_pdflatex_cmd . ' && ' . s:neotex_pdflatex_cmd
endif

if get(g:, 'neotex_enabled', 1) == 2
au! _neotex_ TextChanged,TextChangedI <buffer> call NeoTexUpdate()
Expand Down

0 comments on commit ca7ab59

Please sign in to comment.