Function: reftex-view-crossref-from-bibtex
reftex-view-crossref-from-bibtex is an autoloaded, interactive and
byte-compiled function defined in reftex-dcr.el.gz.
Signature
(reftex-view-crossref-from-bibtex &optional ARG)
Documentation
View location in a LaTeX document which cites the BibTeX entry at point.
Since BibTeX files can be used by many LaTeX documents, this function prompts upon first use for a buffer in RefTeX mode. To reset this link to a document, call the function with a prefix arg. Calling this function several times find successive citation locations.
Probably introduced at or before Emacs version 21.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-dcr.el.gz
;;;###autoload
(defun reftex-view-crossref-from-bibtex (&optional arg)
"View location in a LaTeX document which cites the BibTeX entry at point.
Since BibTeX files can be used by many LaTeX documents, this function
prompts upon first use for a buffer in RefTeX mode. To reset this
link to a document, call the function with a prefix arg.
Calling this function several times find successive citation locations."
(interactive "P")
(when arg
;; Break connection to reference buffer
(put 'reftex-bibtex-view-cite-locations :ref-buffer nil))
(let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer)))
;; Establish connection to reference buffer
(unless ref-buffer
(setq ref-buffer
(save-current-buffer
(completing-read
"Reference buffer: "
(delq nil
(mapcar
(lambda (b)
(set-buffer b)
(if reftex-mode (list (buffer-name b)) nil))
(buffer-list)))
nil t)))
(put 'reftex-bibtex-view-cite-locations :ref-buffer ref-buffer))
;; Search for citations
(bibtex-beginning-of-entry)
(if (looking-at
"@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*\\([^, \t\r\n}]+\\)")
(progn
(goto-char (match-beginning 1))
(reftex-view-regexp-match
(format reftex-find-citation-regexp-format
(regexp-quote (match-string 1)))
4 arg ref-buffer))
(error "Cannot find citation key in BibTeX entry"))))