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: Shan
Subject: Re: [AUCTeX] LaTeX-equation-label with file-dependent prefix
Date: Fri, 7 Jun 2013 09:51:33 -0500

Hi Tassilo,

Thanks again for your help. The value of LaTeX-equation-label is set correctly in the file. However, when I use the C-c C-e to add an equation, it suggest nothing but "(optional) what label:". Is it because my .emacs file? But I didn't see anything related. My auctex is compiled from the source yesterday. What should I do next?


On Fri, Jun 7, 2013 at 6:49 AM, Tassilo Horn <address@hidden> wrote:
Shan <address@hidden> writes:

> It seems that the lisp function concat, file-name-nondirectory and
> file-name-sans-extension haven't been executed in my case.

My fault.  It set the value of LaTeX-equation-label to (concat ...)
instead of evaluating it.  This does indeed work:

--8<---------------cut here---------------start------------->8---
%%% Local Variables:
%%% eval: (set (make-local-variable 'LaTeX-equation-label)
%%%            (concat
%%%             (file-name-nondirectory
%%%              (file-name-sans-extension
%%%               (buffer-file-name)))
%%%             ":" LaTeX-equation-label))
%%% LaTeX-label-function: nil
%%% End:
--8<---------------cut here---------------end--------------->8---

When I put it in the file bar.tex, it'll suggest a label starting with
"bar:eq:".

Bye,
Tassilo


_______________________________________________
auctex mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/auctex



--

Best,
Shan

reply via email to

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