[OS X Emacs] automatic label insertion for theorem-like environments in Aquamacs
David Romano
romanod at math.grinnell.edu
Fri Feb 26 15:25:12 EST 2010
I've managed to custonmize the reftex label alist so that C-c C-m \label
generates a label for theorem-like environments, but I can't get these
labels to be generated automatically by using C-c C-e to insert a
theorem-like environment.
I've followed the "Theorem and Axiom" section of the RefTeX manual as
closely as possible, but I'm not sure how to alter the variable Latex Mode
Hook as it indicates: There the instructions are to change the .emacs
file, but I would rather use "Customize" and it's not clear to me how to
translate the lisp code correctly.
The Latex Mode Hook section looks like this:
---
Latex Mode Hook: Hide Value
INS DEL preview-mode-setup
INS DEL smart-dnd-latex
INS DEL #[nil "\300\301!\207" [TeX-fold-mode t] 2]
INS DEL LaTeX-install-toolbar
INS DEL turn-on-bib-cite
INS DEL turn-on-reftex
INS
State: EDITED, shown value does not take effect until you set or save
it.
---
and pressing 'INS' only produces an empty text box. The (sample) lisp
code to be added to the .emacs file is:
(add-hook 'LaTeX-mode-hook
(lambda ()
(LaTeX-add-environments
'("axiom" LaTeX-env-label)
'("theorem" LaTeX-env-label))))
and I've had no luck converting this into a single line of text to put in
the text box. Is there a way to do this? Or is altering the .emacs file
the only option?
Thanks,
David Romano
More information about the MacOSX-Emacs
mailing list