diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-11-21 14:08:42 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-11-21 14:09:22 -0700 |
commit | 03c141a00e38d66f29f84950002fea0b10d5816f (patch) | |
tree | 954cef7eba68df1d135847d337ee3095ca021623 | |
parent | 5ea02285bacb9592b20c95d4797ca7c2ec68ecac (diff) | |
download | org-mode-03c141a00e38d66f29f84950002fea0b10d5816f.tar.gz |
"cite" link type in contrib/org-bibtex-extras
-rw-r--r-- | contrib/lisp/org-bibtex-extras.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/lisp/org-bibtex-extras.el b/contrib/lisp/org-bibtex-extras.el index 93c97a9..3b2ad88 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 "<i>%s</i>" 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 |