[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Defining new citation formats with natbib
From: |
Sven Bretfeld |
Subject: |
Re: [AUCTeX] Defining new citation formats with natbib |
Date: |
Fri, 19 Jan 2007 18:38:48 +0100 |
Ralf Angeli writes:
Hi Rald, hi list
>
> I'm not sure if you are using the code like cited above. If you do
> this won't work because part of it is commented. Try the following
> reformatted version instead (which is working fine with my
> installation):
No, that was an error produced by my MUA. I've found the correct code
in the meantime. It is a little different from the one I tried
first. This entry to .emacs works:
(defun my-LaTeX-mode-setup ()
(add-hook 'find-file-hooks
'(lambda ()
(when (and (fboundp 'reftex-set-cite-format)
(member "natbib" (TeX-style-list)))
(reftex-set-cite-format
'((?\C-m . "\\cite{%l}")
(?t . "\\citealt{%l}")
(?T . "\\citet{%l}")
(?s . "\\citealtse{%l}")
(?S . "\\citetse{%l}")
(?p . "\\citealtpr{%l}")
(?P . "\\citetpr{%l}")
(?n . "\\nocitese{%l}")
(?N . "\\nocite{%l}")))))
t))
(add-hook 'LaTeX-mode-hook 'my-LaTeX-mode-setup)
Thanks for your help
Sven