It seems that the lisp function concat, file-name-nondirectory and file-name-sans-extension haven't been executed in my case.
On Thu, Jun 6, 2013 at 11:28 AM, Shan <[email protected]> wrote: > Hi Tassilo, > > Thanks for your help. I'm sorry but I can't get this working in my file. > When I use C-c C-e to insert a new equation, I was prompted to insert a > label instead of getting a filename as prefix. Am I missing something? > Thanks! > > > On Thu, Jun 6, 2013 at 1:48 AM, Tassilo Horn <[email protected]> wrote: > >> Shan <[email protected]> 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 >> >> >> _______________________________________________ >> auctex mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/auctex >> > > > > -- > > Best, > Shan > -- Best, Shan
_______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
