auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom RefTeX TOC entry


From: Alessandro Bertulli
Subject: Re: Custom RefTeX TOC entry
Date: Thu, 02 Feb 2023 14:59:54 +0100
User-agent: mu4e 1.8.11; emacs 30.0.50

Arash Esbati <arash@gnu.org> writes:

> I meant this part of the code from songs.el is not good:
>
>    ;; Tell RefTeX:
>    (when (boundp 'reftex-section-levels)
>      (dolist (elt '(("songchapter" . 0) ("songsection" . 1)))
>        (add-to-list 'reftex-section-levels elt t)))
>
> I think we should leave this change to the users and an AUCTeX style
> doesn't touch this variable at all.

I am by no way an experienced user, so you surely will know better than
me. However, according to the `songs` manual, `\songsection` is just the
same as `\section`, so to me it makes sense to treat them equally. Same
goes for `\songchapter`.

Treating each song as a different paragraph is OTOH just a convenience,
but I find it useful (since usually if you're writing a song book that
will be the basic unit of text you'll manipulate).

I've expanded the style code a bit, feel free to check it out and
correct me if I did somenthing wrong

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

.

I have BTW one question about it: songs need to be inserted between
`\beginsong` and `\endsong` commands. Those look like an environment to
me, but LaTeX environments are inserted between `\begin{}` and `\end{}`
macros. Where should I put those in the style file, so that AUCTeX
inserts them in couples?

-- 
Alessandro Bertulli

reply via email to

[Prev in Thread] Current Thread [Next in Thread]