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...

3 Answers 3

2

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.

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}")))))
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?

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
    Jun 10, 2011 at 12:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .