[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom RefTeX TOC entry
From: |
Arash Esbati |
Subject: |
Re: Custom RefTeX TOC entry |
Date: |
Mon, 30 Jan 2023 16:29:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Alessandro Bertulli <alessandro.bertulli96@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
songs.el
Description: application/emacs-lisp