Update rust and latex

This commit is contained in:
Adam Stankiewicz
2013-09-27 10:21:44 +02:00
parent 811fe888a6
commit b6a2261cc2
2 changed files with 4 additions and 3 deletions

View File

@@ -344,10 +344,11 @@ function! s:ReadTOC(auxfile, texfile, ...)
let page = '' let page = ''
endif endif
" parse section number " parse section number
let secnum = ''
if len(tree[1]) > 3 && empty(tree[1][1]) if len(tree[1]) > 3 && empty(tree[1][1])
call remove(tree[1], 1) call remove(tree[1], 1)
endif endif
if len(tree[1]) > 1 if len(tree[1]) > 1 && tree[1][0] =~ '\(numberline\|tocsection\)'
if !empty(tree[1][1]) if !empty(tree[1][1])
let secnum = LatexBox_TreeToTex(tree[1][1]) let secnum = LatexBox_TreeToTex(tree[1][1])
let secnum = substitute(secnum, '\\\S\+\s', '', 'g') let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
@@ -356,12 +357,12 @@ function! s:ReadTOC(auxfile, texfile, ...)
endif endif
let tree = tree[1][2:] let tree = tree[1][2:]
else else
let secnum = ''
let tree = tree[1] let tree = tree[1]
endif endif
" parse section title " parse section title
let text = LatexBox_TreeToTex(tree) let text = LatexBox_TreeToTex(tree)
let text = substitute(text, '^{\+\|}\+$', '', 'g') let text = substitute(text, '^{\+\|}\+$', '', 'g')
let text = substitute(text, '\*', '', 'g')
" add TOC entry " add TOC entry
call add(fileindices[texfile], len(toc)) call add(fileindices[texfile], len(toc))

View File

@@ -18,7 +18,7 @@ syn keyword rustOperator as
syn match rustAssert "\<assert\(\w\)*!" contained syn match rustAssert "\<assert\(\w\)*!" contained
syn match rustFail "\<fail\(\w\)*!" contained syn match rustFail "\<fail\(\w\)*!" contained
syn keyword rustKeyword break do extern syn keyword rustKeyword break continue do extern
syn keyword rustKeyword in if impl let log syn keyword rustKeyword in if impl let log
syn keyword rustKeyword for impl let log syn keyword rustKeyword for impl let log
syn keyword rustKeyword loop mod once priv pub syn keyword rustKeyword loop mod once priv pub