Support subequations label completion
This commit is contained in:
parent
09a9d0f9de
commit
e9f2cd4067
@ -395,8 +395,7 @@ function! s:labels_parse_number(num_tree) " {{{1
|
||||
return s:labels_parse_number(a:num_tree[l:index])
|
||||
endif
|
||||
else
|
||||
let l:num = str2nr(a:num_tree)
|
||||
return l:num > 0 ? l:num : '-'
|
||||
return str2nr(a:num_tree) > 0 ? a:num_tree : '-'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
\documentclass{article}
|
||||
\usepackage{biblatex}
|
||||
\usepackage{amsmath}
|
||||
\addbibresource{biblatex-examples.bib}
|
||||
\addbibresource{local1.bib}
|
||||
\addbibresource{~/.vim/bundle/vim-latex/test/completion/local2.bib}
|
||||
@ -68,4 +69,13 @@ To test label completion you need to compile the document first!
|
||||
f(x) = 10
|
||||
\end{equation}
|
||||
|
||||
\begin{subequations}
|
||||
\begin{align}
|
||||
\label{eq:test11a}
|
||||
f(x) &= 11a \\
|
||||
\label{eq:test11b}
|
||||
f(x) &= 11b
|
||||
\end{align}
|
||||
\end{subequations}
|
||||
|
||||
\end{document}
|
||||
|
Loading…
Reference in New Issue
Block a user