citar

citar is a reference management package in emacs, with integration in org, md and latex buffers. it provides lots of very convenient functions.

getting citekeys:

(citar-select-ref)
;; "sunPlaTeVisuallyGroundedPlanning2022"
(citar-select-refs)
;;("firooziFoundationModelsRobotics2023" "sunPlaTeVisuallyGroundedPlanning2022")

getting fields:

(citar-get-value "title" (citar-select-ref))
;;"Foundation Models in Robotics: Applications, Challenges, and the Future"

insert cite link:

(citar-insert-citation (citar-select-refs)) ;; take a list as arg
;; work differently in org, markdown and latex buffers
;; for org, I ripped a set of [] because I just can't get org-export to ignore the cite link
;; org: cite:baltimore2023fast (a org-cite link)
;; markdown: [@baltimore2023fast]
;; latex: \cite{baltimore2023fast} (will prompt for cite command, \cite or else)

org-roam integration:

;; in follow link action of cite links, org-roam-notes
(citar-open-note)  ;; prompt for a org-roam note in a list when interactive; don't konw what when called directly
(citar-open-notes (citar-select-refs)) ;; prompt for a citation and open its org-roam note(or create one)
citar-org-roam-note-title-template

Author: Linfeng He

Created: 2024-04-03 Wed 20:16