[Vim-latex-devel] Autocompletion of theorems when using tcolorbox
Brought to you by:
srinathava,
tmaas
From: George <geo...@gm...> - 2016-06-20 19:38:18
|
Dear all, I'm using tcolorbox[1] to create coloured boxes for my theorems. Tcolorbox has its own way of labelling theorems, which does not play well with the label completion of vim-latex suite. Here is an example to demonstrate. First I define a theorem environment using tcolorbox, as follows: \newtcbtheorem[number within=section]% {theorem} % \begin.. {Theorem} % Title {} % Style - default {theo} % label prefix; cite as ``theo:yourlabel'' Then, inside my document I can write: \begin{theorem}{The title}{mylabel} This is a theorem. \end{theorem} and I'll get a theorem inside a coloured box. Then I can cite that theorem by writing "\ref{theo:mylabel}". The problem is that if I type "\ref{" and press F9, vim-latex will not recognise the label "theo:mylable", so it won't automplete. Does by any chance vim-latex recognizes labels by grepping the document for "\label{****}" and parsing what's inside? In that case I guess there's no hope but otherwise, Is there any way to work around that? Thank you for your time, George Links: 1. https://www.ctan.org/pkg/tcolorbox?lang=en |