Skip to content

Commit

Permalink
Merge pull request #238 from HarmtH/memoirsupport
Browse files Browse the repository at this point in the history
Memoir support
  • Loading branch information
lervag committed Mar 5, 2015
2 parents f6e465c + e15f6fc commit 0992511
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 0992511

Please sign in to comment.