Why hasn't my customising of reftex-cite-format been recognised?

2

In my .emacs I set up the following code to allow me to use biblatex cite commands when editing LaTeX files:

    (setq reftex-cite-format 
      '(
        (\C-m . "\\cite[]{%l}")
        (?p . "\\parencite[]{%l}")
        (?t . "\\textcite[]{%l}")))

But it has had no effect. It still seems to be defaulting to the set of cite commands I had set previously with M-x customize-variable. Why? And how do I get emacs to recognise the change? I have tried restarting emacs...

Seamus

Posted 2011-06-06T21:23:43.417

Reputation: 865

Answers

1

I stumbled upon this problem in 2018 and found a solution that might be helpful to others as well:

Auctex introduced the variable in version 11.90

LaTeX-reftex-cite-format-auto-activate

Only if this variable is set to nil, the variable

reftex-cite-format

will have an effect. Hope it helps someone.

eike

Posted 2011-06-06T21:23:43.417

Reputation: 11

1

As indicated by https://tex.stackexchange.com/a/31992/5701 you may have to set the variable inside (eval-after-load 'reftex-vars)`. This is just a guess and I notice that it might be bad practice.

(eval-after-load 'reftex-vars
  '(progn
     (setq reftex-cite-format
           '((\C-m . "\\cite[]{%l}")
             (?p . "\\parencite[]{%l}")
             (?t . "\\textcite[]{%l}")))))

N.N.

Posted 2011-06-06T21:23:43.417

Reputation: 1 341

0

Just a guess, but at the end of my .emacs file is a custom-set-variables block which is written to when I use M-x customize-variable. Maybe yours is the same, and your changes to reftex-cite-format are being overwritten by this?

user314253

Posted 2011-06-06T21:23:43.417

Reputation: 1

Yeah I thought of that. I didn't see anything setting reftex-cite-format in the custom-set-variables block and putting the above code at the very end of my .emacs doesn't make a difference. – Seamus – 2011-06-10T12:09:26.663