Is there any way in Latex to collect the labels for references from a document in a table? I'm writing a long document but would like to collect together my references of various kinds (i.e. equations, theorems, figures etc) in tables in a secondary document to help me with document maintenance.
I'd like this process to be automatic, i.e. that the referencing would update with every build (of the reference document) using the aux file of the main document. I'm aware (see this question) of the xr package, which should take care of defining the references for me in the secondary document.
What I'd like to know is how to build a table, say, of all equation numbers that have a label, along with the label, in each case - also how to adapt the code for figures, theorems etc if it's not immediately obvious (I'm not that bright when it comes to all things latex)