Open co0p opened 11 years ago
Hmmm... it is probably not picked up. Will need to look into this.
On Sat, Jun 29, 2013 at 4:23 PM, Julian Godesa notifications@github.comwrote:
I am using the listing package. The declared label is missing from the drop down ref list...
\lstset{basicstyle=\footnotesize, language=c, label={code:bubble}, caption={...}} \lstinputlisting{../resources/code/bubble.c} \ref{ ... missing here .... }
— Reply to this email directly or view it on GitHubhttps://github.com/SublimeText/LaTeXTools/issues/214 .
Marciano Siniscalchi Economics Department, Northwestern University http://faculty.wcas.northwestern.edu/~msi661
This is going to require special handling... I suppose just adding a label statement won't work, right? As a workaround you could put the listing in a table and add a label to that...
Today, I stumbled upon an identical issue, using the (more powerful) listings
package (note the trailing s
). I believe this might be bugging quite a lot of people, because those writing LaTeX in Sublime Text are often the tech-savvy ones dealing with code everyday.
Putting listings in a table is not a suitable workaround because this screws up the 'List of Listings' and 'List of Tables' sections.
Is there an update on this issue? If someone can guide me, I am willing to work on a patch for this.
I think the functionality can be added in latex_ref_completions.py.
The \lstlisting
commands need to be found and the labels extracted from their arguments to be put in the completions
list.
@Mq- Technically there are also other consumers of the known labels, which would not work in that case, e.g. jumpto_anywhere.py and the toc_quickpanel.
However the auto completion is the most important, so yes that should be enough for the autocompletion current view and document analysis.
Note if you want to implement something:
I am also expecting this feature. Thank you for your great work!
I am using the listing package. The declared label is missing from the drop down ref list...
here is a small working example: