Display content in separate buffer in Emacs+AUCTeX

Is there a way to display something like table of content of my current latex file in separate buffer, where all sections, subsections, figures and tables are listed interactively? So I could instantly jump to the piece just by clicking on it's link.

-

Yes there is such a way, and it is called reftex!

It should be included with your auctex installation. To start it, simply add the following in your .emacs and restart emacs :

(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)


reftex has many features, including easily insertion of labels, citations and references, AND an interactive table of contents. To access it, type C^c =. In the table of contents, use Enter to go to the selected section and close the ToC, Tab to go there without closing the ToC.

There are several other keys available, to show for example labels and crossref, you can find a small list at the bottom of the ToC buffer, or a complete list by typing ?.

-
Thank you, that is very nice and it will be very handy. Is it possible to include in ToC tables and figures even if they are not labeled? –  user21710 Nov 17 '12 at 11:23
I doubt it would be easy, since reftex relies on the \label commands to find it. Anyway, what's the point of having unlabelled figures or tables? –  T. Verron Nov 17 '12 at 12:04
I am working with other people latex documents and sometimes they leave floating objects unlabeled and refer to them with text. So if You say it is possible I will find a way. Again, thank you. –  user21710 Nov 17 '12 at 22:41
@user21710 : That problem isn't really relevant to the present question, but if you want a starting point, I'd say the "easiest" way would be to write a short elisp macro searching e.g. for \end{figure}, checking if the environment contains a \label, and add one if needed. Or to do this by hand if there aren't many figures involved. And don't forget to explain your coworkers why labelling figures is easy (even if I doubt they're using emacs) and good-practice. –  T. Verron Nov 17 '12 at 22:55