auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] enhance reftex-label-alist, the label-prefix.


From: Uwe Brauer
Subject: [AUCTeX-devel] enhance reftex-label-alist, the label-prefix.
Date: Thu, 18 Dec 2008 14:43:57 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.21 (linux)

Hello 

Part of reftex-label-alist, is the label prefix which is given by


LABEL-PREFIX
    Label prefix string, like "tab:".
    The prefix is a short string used as the start of a label.  It may be the
    empty string.  The prefix may contain the following `%' escapes:
       %f   Current file name with directory and extension stripped.
       %F   Current file name relative to directory of master file.
       %m   Master file name, directory and extension stripped.
       %M   Directory name (without path) where master file is located.
       %u   User login name, on systems which support this.
       %S   A section prefix derived with variable `reftex-section-prefixes'.


I use always %f, which I find very useful.

However for very long documents I would find it useful to have *in
addition* a _new_ section prefix, which is based on the label of the
section.

Example

The file test.tex contains
\section{Contraction in the lower norm}
\label{sec:contr-lower-norm}

(That label was automatically generated)

With the current setting 
(setq reftex-label-alist
     '(("equation"  ?e "eq:%f:S:" "~(\\ref{%s})" t
       ("Equation" "Eq." "Eqn." "Gleichung"  "Gl.")))


I would obtain for an equation
\begin{equation}
\label{eq:test:S:1}
\int 
\end{equation}


However what I would like is 

\begin{equation}
\label{eq:test:sec:contr-lower-norm:1}
\int 
\end{equation}

Could that be implemented easily?


Thanks 


Uwe Brauer 





reply via email to

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