auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Support for biblatex in Reftex


From: Arash Esbati
Subject: [AUCTeX-devel] Support for biblatex in Reftex
Date: Tue, 18 Oct 2016 11:58:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1

Hi all,

after the discussion here [1], I suggest to apply this patch to
`reftex-cite-format-builtin':

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index d1a6b87..d55a755 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -151,6 +151,22 @@ reftex-cite-format-builtin
       (?A    . "\\citeauthor*{%l}")
       (?y    . "\\citeyear{%l}")
       (?n    . "\\nocite{%l}")))
+    (biblatex "The Biblatex package"
+     ((?\C-m . "\\cite[][]{%l}")
+      (?C    . "\\cite*[][]{%l}")
+      (?t    . "\\textcite[][]{%l}")
+      (?T    . "\\textcite*[][]{%l}")
+      (?p    . "\\parencite[][]{%l}")
+      (?P    . "\\parencite*[][]{%l}")
+      (?f    . "\\footcite[][]{%l}")
+      (?s    . "\\smartcite[][]{%l}")
+      (?u    . "\\autocite[][]{%l}")
+      (?U    . "\\autocite*[][]{%l}")
+      (?a    . "\\citeauthor[][]{%l}")
+      (?A    . "\\citeauthor*[][]{%l}")
+      (?y    . "\\citeyear[][]{%l}")
+      (?Y    . "\\citeyear*[][]{%l}")
+      (?n    . "\\nocite{%l}")))
     (amsrefs "The AMSRefs package"
      ((?\C-m . "\\cite{%l}")
       (?p    . "\\cite{%l}")
--8<---------------cut here---------------end--------------->8---

It can be activated in biblatex.el with something like this:

--8<---------------cut here---------------start------------->8---
(when (fboundp 'reftex-set-cite-format)
  (if (or (LaTeX-provided-package-options-member "biblatex" "natbib")
          (LaTeX-provided-package-options-member "biblatex" "natbib=true"))
      (reftex-set-cite-format 'natbib)
    (reftex-set-cite-format 'biblatex)))
--8<---------------cut here---------------end--------------->8---

I'm not a biblatex user, maybe serious users can give a comment on the
chosen commands and key bindings.  I tried to keep close to natbib.

Best, Arash

Footnotes: 
[1]  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24667




reply via email to

[Prev in Thread] Current Thread [Next in Thread]