I am using the listings package to incorporate listings into my paper.
However I'd like to reference individual parts of the code with a small circular number (such as say the number 1 in white surrounded by a small black filled circle) and then reference this within the main body outside of the listing by reusing the small graphic along with some explanatory text.
I am not sure how to place my code here but essentially it is just code within:
\begin{lstlisting}[caption=...]
this is some code here...
\end{lstlisting}
So in summary a way of referencing an individual part of a listing within the code and using that reference in my main body. In the above example say a small indicator by the 'some' and then be able to reference that in my body afterwards.
Apologies if I sound confused. I know what I am trying to do but couldn't see any way of doing it in the listing documentation.


bcan be referenced by its own name, "b". Maybe what you like is to highlightb. Anyway I posted an alternative usingfootnote. – alfC Dec 31 '15 at 00:21