]> git.donarmstrong.com Git - org-ref.git/commitdiff
add bibliographystyle completion
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Sun, 15 Mar 2015 22:23:45 +0000 (18:23 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Sun, 15 Mar 2015 22:23:45 +0000 (18:23 -0400)
org-ref.el

index 939b8ee7102ee218574b0fac89f6616c3ec2177f..87deb290285bd15b47a05e8535faadba807b627f 100644 (file)
@@ -748,11 +748,26 @@ Format according to the type in `org-ref-bibliography-entry-format'."
                       ;; write out the latex bibliography command
                       (format "\\bibliographystyle{%s}" keyword)))))
 
                       ;; write out the latex bibliography command
                       (format "\\bibliographystyle{%s}" keyword)))))
 
+
+(defun org-bibliographystyle-complete-link (&optional arg)
+  "Completion function for bibliographystyle link.
+ARG does nothing."
+  (format "bibliographystyle:%s" (ido-completing-read
+                                 "style: "
+                                 '("unsrt" "plain" "alpha"
+                                   ;; natbib
+                                   ;; https://www.sharelatex.com/learn/Natbib_bibliography_styles
+                                   "dinat" "humannat" "plainnat"
+                                   "abbrnat" "unsrtnat" "rusnat"
+                                   "ksfhnat"))))
+
+
 (defun org-bibliography-complete-link (&optional arg)
   "Completion function for bibliography link.
 ARG does nothing."
   (format "bibliography:%s" (read-file-name "enter file: " nil nil t)))
 
 (defun org-bibliography-complete-link (&optional arg)
   "Completion function for bibliography link.
 ARG does nothing."
   (format "bibliography:%s" (read-file-name "enter file: " nil nil t)))
 
+
 (defun org-ref-insert-bibliography-link ()
   "Insert a bibliography with completion."
   (interactive)
 (defun org-ref-insert-bibliography-link ()
   "Insert a bibliography with completion."
   (interactive)