auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] LaTeX-equation-label with file-dependent prefix


From: Tassilo Horn
Subject: Re: [AUCTeX] LaTeX-equation-label with file-dependent prefix
Date: Thu, 06 Jun 2013 08:48:21 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Shan <address@hidden> writes:

Hi Shan,

> Since I have several tex files included in a main tex file, I'm
> wondering whether it is possible that I can redefine the
> LaTeX-equation-label so that the equation label may take the filename
> (or some environment variable) as an additional prefix. Thank you very
> much!

This works for me:

%%% Local Variables:
%%% LaTeX-equation-label: (concat
%%%                        (file-name-nondirectory
%%%                         (file-name-sans-extension
%%%                          (buffer-file-name)))
%%%                        ":" LaTeX-equation-label))
%%% LaTeX-label-function: nil
%%% End:

The `LaTeX-label-function' is explicitly set to nil, because if you are
using reftex, it's set to `reftex-label' which doesn't use
`LaTeX-equation-label' to construct a label name.

Bye,
Tassilo




reply via email to

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