diff options
author | Arash Esbati <arash@gnu.org> | 2019-10-26 13:29:14 +0200 |
---|---|---|
committer | Tassilo Horn <tsdh@gnu.org> | 2019-10-26 20:38:55 +0200 |
commit | 75b9f4652bad2f408a45a51bc1bbff8bc70d3552 (patch) | |
tree | e8b2a9b17e2ccd63045143c08d70e2039d0df025 /lisp/textmodes/reftex-dcr.el | |
parent | 368e88b8cbeceaac898f5d6793257378866c99c8 (diff) | |
download | emacs-75b9f4652bad2f408a45a51bc1bbff8bc70d3552.tar.gz |
Improve support for biblatex and cleveref macros
* lisp/textmodes/reftex-cite.el (reftex-figure-out-cite-format):
Extend regexp to match additional cite commands from biblatex.sty.
* lisp/textmodes/reftex-dcr.el (reftex-view-crossref): Extend
regexp to match additional cite commands from biblatex.sty and
reference commands from cleveref.sty.
Diffstat (limited to 'lisp/textmodes/reftex-dcr.el')
-rw-r--r-- | lisp/textmodes/reftex-dcr.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index 8973e5dc1a2..95a33077c71 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el @@ -60,11 +60,15 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'." (setq reftex-call-back-to-this-buffer (current-buffer)) (cond - ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro) - ;; A citation macro: search for bibitems or BibTeX entries + ((string-match "\\`\\\\cite\\|cite\\([s*]\\|texts?\\)?\\'\\|bibentry" macro) + ;; A citation macro: search for bibitems or BibTeX entries. + ;; Match also commands from biblatex ending with `s' + ;; (\parencites) or `*' (\parencite*) and `texts?' + ;; (\footcitetext and \footcitetexts). (setq dw (reftex-view-cr-cite arg key auto-how))) - ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro) - ;; A reference macro: search for labels + ((string-match "\\`\\\\ref\\|ref\\(range\\|s\\)?\\*?\\'" macro) + ;; A reference macro: search for labels. + ;; Match also commands from cleveref ending with `s' (\namecrefs). (setq dw (reftex-view-cr-ref arg key auto-how))) (auto-how nil) ;; No further action for automatic display (speed) ((or (equal macro "\\label") |