The org-ref
package contains this functionality. Contrary to the name, org-ref
has a lot of functionality outside of org mode. Take a look at the function org-ref-format-bibtex-entry
. It also integrates this into helm-bibtex
, so if you get everything set up correctly, you can call helm-bibtex
, mark the citations you want, then hit f7
which inserts a formatted list.
EDIT:
If you didn't want to add a whole package with lots of dependencies, you can write your own function. Here's an example to illustrate:
(defun bibtex-format-entry-to-string ()
"Format bibtex entry under point to a string."
(interactive)
(save-excursion
(bibtex-beginning-of-entry)
(let ((authors (bibtex-text-in-field "author"))
(year (bibtex-text-in-field "year"))
(title (bibtex-text-in-field "title")))
(format "%s, %s, %s" authors year title))))