[Top][All Lists]

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

[AUCTeX] reftex-view-crossref-extra and biblatex

From: Matthew Lundin
Subject: [AUCTeX] reftex-view-crossref-extra and biblatex
Date: Sun, 26 Apr 2009 10:05:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)


I was happy to see that there has been some discussion recently of
implementing biblatex support in AUCTeX:

Regarding reftex, I have been able to implement biblatex support with a
custom reftex-cite-format.

However, I do have one minor issue with the function
reftex-view-crossref (i.e., the function to see the bib entry for a cite
macro). The regexp for determining the type of cross-reference is
hard-coded and assumes conventional BibTeX citation macros. Biblatex,
however, allows for plural "cite" macros (e.g., \footcites, \autocites,
\cites). The problem is that reftex-view-crossref does not detect these
macros written in plural form.

My temporary workaround is to rewrite the function reftex-view-crossref
as follows (excuse the git cruft from my own repository):

--8<---------------cut here---------------start------------->8---
diff --git a/reftex-dcr.el b/reftex-dcr.el
index 8cd74ca..a67749c 100644
--- a/reftex-dcr.el
+++ b/reftex-dcr.el
@@ -62,7 +62,7 @@ to the functions `reftex-view-cr-cite' and 
       (setq reftex-call-back-to-this-buffer (current-buffer))
-       ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro)
+       ((string-match "\\`\\\\cites*\\|cites*\\*?\\'\\|bibentry" macro)
        ;; A citation macro: search for bibitems or BibTeX entries
        (setq dw (reftex-view-cr-cite arg key auto-how)))
        ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro)
--8<---------------cut here---------------end--------------->8---

Though I have little understanding of elisp, this hack seems to work for
now. I would be most grateful if someone could let me know if I am on
the right track.

Also I would be eager to learn if there any current plans to add
biblatex support to reftex. I realize that biblatex is still in beta, so
I can certainly understand that there are good reasons *not* to
implement support just yet.

Thank you in advance for your help.


reply via email to

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