From 03c141a00e38d66f29f84950002fea0b10d5816f Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Thu, 21 Nov 2013 14:08:42 -0700 Subject: [PATCH] "cite" link type in contrib/org-bibtex-extras --- contrib/lisp/org-bibtex-extras.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/lisp/org-bibtex-extras.el b/contrib/lisp/org-bibtex-extras.el index 93c97a912..3b2ad8885 100644 --- a/contrib/lisp/org-bibtex-extras.el +++ b/contrib/lisp/org-bibtex-extras.el @@ -94,6 +94,14 @@ For example, to point to your `obe-bibtex-file' use the following. (outline-previous-visible-heading 1) t))) +(defun obe-citation-export (path desc format) + (cond + ((eq format 'html) (format "%s" desc)) + ((eq format 'latex) (format "\\cite{%s}" path)) + (t desc))) + +(org-add-link-type "cite" 'obe-goto-citation 'obe-citation-export) + (defun obe-html-export-citations () "Convert all \\cite{...} citations in the current file into HTML links." (save-excursion