# show list of slides in AucTeX

While editing beamer in Emacs with AUCTeX and RefTeX, how can I make the C-c = command list the frames instead the sections? Is it possible to customize the outline command?

The key binding C-c = is provided by RefTeX and not by AUCTeX. C-h k C-c = returns:

C-c = runs the command reftex-toc (found in reftex-mode-map), which is an autoloaded interactive compiled Lisp function in ‘reftex-toc.el’.

It is bound to C-c =, .

(reftex-toc &optional REBUILD REUSE)

Show the table of contents for the current document. When called with a raw C-u prefix, rescan the document first.

In order to tell RefTeX about new sectioning commands you have to customize the variable reftex-section-levels:

reftex-section-levels is a variable defined in ‘reftex-vars.el’. Its value is shown below.

You can customize this variable.

Documentation: Commands and levels used for defining sections in the document. This is an alist with each element like (COMMAND-NAME . LEVEL). The car of each cons cell is the name of the section macro (without the backslash). The cdr is a number indicating its level. A negative level means the same level as the positive value, but the section will never get a number. The cdr may also be a function which will be called to after the section-re matched to determine the level. This list is also used for promotion and demotion of sectioning commands. If you are using a document class which has several sets of sectioning commands, promotion only works correctly if this list is sorted first by set, then within each set by level. The promotion commands always select the nearest entry with the correct new level.

Suppose your .tex file looks like this:

\documentclass{beamer}

\begin{document}

\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number.
\end{theorem}
\begin{proof}
\begin{enumerate}
\item<1-| alert@1> Suppose $p$ were the largest prime number.
\item<2-> Let $q$ be the product of the first $p$ numbers.
\item<3-> Then $q+1$ is not divisible by any of them.
\item<1-> But $q + 1$ is greater than $1$, thus divisible by some prime
number not in the first $p$ numbers.\qedhere
\end{enumerate}
\end{proof}
\end{frame}

\end{document}


Do M-x customize-variable RET reftex-section-levels RET and add values for frametitle and framesubtitle like this:

And hit Apply and Save. Now open your .tex file and try it again.