]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.el
make the example user function more functional.
[org-ref.git] / org-ref.el
index 1d9ec6880778cfda2538be488d91694b43273f76..72b4b528d9741b8722b4377d751474e5f0b60542 100644 (file)
@@ -1423,9 +1423,10 @@ Optional argument ARG Does nothing."
  ;formatting
  (lambda (keyword desc format)
    (cond
-    ((eq format 'html) (format "(<eqref>%s</eqref>)" path))
-    ((eq format 'latex)
-     (format "\\eqref{%s}" keyword)))))
+    ((eq format 'latex) (format "\\eqref{%s}" keyword))
+    ;;considering the fact that latex's the standard of math formulas, just use mathjax to render the html
+    ;;customize the variable 'org-html-mathjax-template' and 'org-html-mathjax-options' refering to  'autonumber'
+    ((eq format 'html) (format "\\eqref{%s}" keyword)))))
 
 ;; ** cite link
 
@@ -3397,7 +3398,13 @@ This is a list of cons cells '((\"description\" . action)). The action function
 ;; example of adding your own function
 (add-to-list
  'org-ref-helm-user-candidates
- '("Example" . (lambda () (message-box "You did it!")))
+ '("Open pdf in emacs" . (lambda ()
+
+                          (find-file
+                           (concat
+                            org-ref-pdf-directory
+                            (car (org-ref-get-bibtex-key-and-file))
+                            ".pdf"))))
  t)
 
 ;;;###autoload