auctex
[Top][All Lists]

## [AUCTeX] RefTeX: Section and chapter numbers into label prefixes

 From: Eugenio Piasini Subject: [AUCTeX] RefTeX: Section and chapter numbers into label prefixes Date: Sun, 20 May 2007 01:29:40 +0200

Hello to everybody. I have a question about RefTeX: I hope this is the right list to post to.
I'm trying to manipulate the "label-prefix" entry of a "reftex-label-alist" item descrybing, say, the environment "proposition", in such a way that when I insert a label inside this kind of environment I automatically get something like

\label{cha:1:sec:2:prop:1}   , or  \label{1:2:prop:1}

where 1 is the number of the current chapter and 2 is the number of the current section.
Initially I thought that the widcard "%S" would do the job, but I found that this just writes the section prefix associated with the current sectioning level (so that "%Sprop" produces, for example, \label{sec:prop:1} or \label{cha:prop:1}).
Does anyone know about a simple way to obtain this result? I mean, I'm a newbie and I don't know enough to write a custom function to insert into "context-method"..

thanks

Eugenio