My first attempt was simply the last line here:
(add-hook 'ConTeXt-mode-hook
(function
(lambda ()
(reftex-mode t)
(auto-fill-mode 1)
(LaTeX-math-mode 1)
))
(setq reftex-cite-format "\\cite[%l]"))
But this command once given is also applied to latex files; I then tried
writing the corresponding instruction in (add-hook 'LaTeX-mode-hook...
but then auctex has reverted to the latex behavior even for context files.
So apparently I cannot customize reftex within aa auctex mode? Or am I
just clumsy?
AUCTeX 11.85
TIA,
--
Jean
A little clumsy, yes :-) First, you need to move the setq form inside
the hook function. As it is, the setq form is being evaluated when
add-hook runs, providing its APPEND argument.
Second, you probably want to make reftex-cite-format's value local to
the Context mode buffers. So:
(add-hook 'ConTeXt-mode-hook
(function
(lambda ()
(reftex-mode t)
(auto-fill-mode 1)
(LaTeX-math-mode 1)
(set (make-local-variable 'reftex-cite-format) "\\cite[%l]"))))
--
Kevin Rodgers
Denver, Colorado, USA
Thank you so much Kevin, this works like a charm!
--
Jean