Alessandro Bertulli <alessandro.bertull...@gmail.com> writes:

> I'm writing a songbook using the `songs`
> (https://songs.sourceforge.net/) package. It works reasonably well with
> AUCTeX, but it uses some custom macros to create song sections and the
> like. For instance, something like
>
> #+begin_src latex
> \songsection{Country}
> #+end_src
>
> The problem is that those headings are not of the usual form
> \section{Country}, and therefore are not scanned by RefTeX when I ask
> for the TOC (C-c = or M-x reftex-toc). Is there a way to instruct RefTex
> to consider those (or other similar constructs) as section headings?

You're looking for `reftex-section-levels'[1].  While we're at, do you
like to write a style file for the package and submit it to AUCTeX?  A
skeleton is attached.  You can put it in a directory under
`TeX-style-private' and then restart AUCTeX.  I didn't test it,
actually :-)

Best, Arash

Footnotes:
[1]  https://www.gnu.org/software/auctex/manual/reftex.html#IDX261

Attachment: songs.el
Description: application/emacs-lisp

Reply via email to