Setting up RefTeX with biblatex citation commands

The variable you need to hook into is reftex-cite-format. Somewhere in my Emacs init file, I have this code:

(eval-after-load 'reftex-vars
  '(progn
     ;; (also some other reftex-related customizations)
     (setq reftex-cite-format
           '((?\C-m . "\\cite[]{%l}")
             (?f . "\\footcite[][]{%l}")
             (?t . "\\textcite[]{%l}")
             (?p . "\\parencite[]{%l}")
             (?o . "\\citepr[]{%l}")
             (?n . "\\nocite{%l}")))))

You should to add your desired commands to this list. The first element in each pair is the letter you want to press after C-c [ to select the given citation format. The empty square brackets denote optional arguments; RefTeX has variables to control whether it prompts your for those. And %l is where the cite key goes.

(You could also set this variable via M-x customize-variable, but I loathe that particular feature of Emacs.)

I'm not sure what the syntax of \blockcquote is...if it has more non-optional arguments than just a cite key, RefTeX might not be able to fully support it (i.e., it inserts the command but you then have to move backwards to fill out other arguments).


Another way to integrate biblatex and csquotes with RefTeX is via YASnippet.

You make a snippet for every citation macro you want to use and have the snippets call reftex-citation.

I use a setup where I type "ct" and press Tab and then I get to choose between the two following snippets.

For \auctocite:

# -*- mode: snippet -*-
# name: autocite \autocite
# key: ct
# --
\autocite[$3]{${2:label$(unless yas/modified-p (reftex-citation 'dont-insert))}}$0

For \textcite:

# -*- mode: snippet -*-
# name: textcite \textcite
# key: ct
# --
\textcite[$3]{${2:label$(unless yas/modified-p (reftex-citation 'dont-insert))}}$0

biblatex citations called via YASnippet

I also use the following for \blockcquote:

# -*- mode: snippet -*-
# name: Formal blockquote \blockcquote
# key: fbq
# expand-env: ((yas/indent-line 'fixed))
# --
\blockcquote[$2]{${1:label$(unless yas/modified-p (reftex-citation 'dont-insert))}}{%
$0%
}

For a collection of snippets for citing with biblatex see https://github.com/Sleft/yasnippet-latex-mode/tree/master/cite.


To get RefTeX to work with csquotes package I use this in my .emacs:

(eval-after-load "tex"
 '(TeX-add-style-hook "csquotes"
   (lambda ()
    (TeX-add-symbols
     '("textcquote" [ "pre-note (post-note if alone)" ] [ "post-note" ] TeX-arg-cite  [ "Punctuation" ] t ignore ignore)
     '("blockcquote" [ "pre-note (post-note if alone)" ] [ "post-note" ] TeX-arg-cite  [ "Punctuation" ] t ignore ignore)
     '("foreigntextcquote"  "Language"  [ "pre-note (post-note if alone)" ] [ "post-note" ] TeX-arg-cite  [ "Punctuation" ] t ignore ignore)
     '("foreignblockcquote" "Language" [ "pre-note (post-note if alone)" ] [ "post-note" ] TeX-arg-cite  [ "Punctuation" ] t ignore ignore)
     ))))

This way when you run C-c C-m blockcquote it will prompt you for the correct arguments and you will get the RefTeX-dialog for choosing a citation label.

I have taken this from somewhere but don't remember where. The important part if you need to edit it is invoking TeX-arg-cite for the correct argument (citation label) of the macros.