Skip to content

Commit

Permalink
Memoir support
Browse files Browse the repository at this point in the history
  • Loading branch information
Harm te Hennepe committed Mar 5, 2015
1 parent f6e465c commit e15f6fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ftplugin/latex-box/motion.vim
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
if len(tree) > 3 && empty(tree[1])
call remove(tree, 1)
endif
if len(tree) > 1 && type(tree[0]) == type("") && tree[0] =~ '^\\\(numberline\|tocsection\)'
if len(tree) > 1 && type(tree[0]) == type("") && tree[0] =~ '^\\\(\(chapter\)\?numberline\|tocsection\)'
let secnum = LatexBox_TreeToTex(tree[1])
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
Expand All @@ -359,7 +359,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
" parse section title
let text = LatexBox_TreeToTex(tree)
let text = substitute(text, '^{\+\|}\+$', '', 'g')
let text = substitute(text, '\m^\\\(no\)\?numberline\s*', '', '')
let text = substitute(text, '\m^\\\(no\)\?\(chapter\)\?numberline\s*', '', '')
let text = substitute(text, '\*', '', 'g')

" add TOC entry
Expand Down

0 comments on commit e15f6fc

Please sign in to comment.