With RefTeX C-c C-) invokes reftex-citation
which first asks for type of label one wants to reference then asks one to select a reference from a list. The list is a list of labels in a document. For LaTeX figures the list includes the caption of each figure (the arguments of \caption
). Whenever a document contains subcaptions done with \subcaption
they are not recognized and therefore not included in the list. Can RefTeX be made to recognize them such that they are put next to their respective labels in the list?
I guess a solution is to modify the variable reftex-label-alist
by letting a regexp find \subcaption
.
Here follows an example to make the problem clearer. Say that you have the following LaTeX document:
\documentclass{article}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{minipage}{.5\linewidth}
\subcaption{A subfigure}\label{fig:1a}
\end{minipage}
\caption{A figure}\label{fig:1}
\end{figure}
\end{document}
If you do C-c C-) you will see something like the following:
Notice that the main figure's caption is shown but not the subfigure's caption.