]> git.donarmstrong.com Git - org-ref.git/blob - README.org
fix keys in body
[org-ref.git] / README.org
1 #+TITLE: org-ref: citations, cross-references, indexes, glossaries and bibtex utilities for org-mode
2
3 See http://www.youtube.com/watch?v=Zya8SfmCtFA and https://www.youtube.com/watch?v=JyvpSVl4_dg for examples of org-ref in action.
4
5 [[./org-ref.org]] contains all documentation and installation instructions.
6
7 [[./doi-utils.org]] contains functions for downloading bibtex entries from  a DOI, and redefines the org-mode doi link so it has more functionality.
8
9 [[./jmax-bibtex.el]] contains some utility functions:
10
11 1. jmax-bibtex runs a menu command with actions to run on a bibtex entry including looking up the doi for the entry in a variety of places, e.g. web of science related/citing articles, Google Scholar, Pubmed, and crossref, or opening a PDF associated with the entry.
12
13 2. Bind M-n/M-p to next/previous bibtex entry.
14
15 3. Sentence/title casing the title of a bibtex entry
16
17 4. Function to replace non-ascii characters in bibtex entries
18
19 5. Functions to replace journal names with @string entries, and corresponding short/long names.
20
21 To install this, add the org-ref repo directory to your load-path, and
22
23 #+BEGIN_SRC emacs-lisp
24 (add-to-list 'load-path "path-to-org-ref")
25 (require 'jmax-bibtex)
26 #+END_SRC
27
28 * Installation
29 You should clone this repository somewhere.
30
31 Here is how I load org-ref. This code is in my init.el file.
32
33 #+BEGIN_SRC emacs-lisp
34 ;; remember this directory
35 (defconst starter-kit-dir (file-name-directory (or load-file-name (buffer-file-name)))
36     "Directory where the starterkit is installed.")
37
38 ;;;;;;; org path for loadable org-files
39 (defvar org-load-path
40   (list (file-name-as-directory
41          (expand-file-name "org" starter-kit-dir)))
42   "List of directories to find org-files that `org-babel-load-file' can load code from.")
43
44 (defun org-require (feature)
45   "Load a FEATURE from an org-file.
46 FEATURE is a symbol, and it is loaded from an org-file by the name of FEATURE.org, that is in the `org-load-path'.  The FEATURE is loaded from `org-babel-load-file'."
47   (let ((org-file (concat (symbol-name feature) ".org"))
48         (path))
49
50     ;; find the org-file
51     (catch 'result
52       (loop for dir in org-load-path do
53             (when (file-exists-p
54                    (setq path
55                          (expand-file-name
56                           org-file
57                           dir)))
58               (throw 'result path))))
59     (let ((default-directory (file-name-directory path)))
60       (org-babel-load-file path))))
61
62 ;; https://github.com/jkitchin/org-ref
63 ;; for loading org-files
64 (add-to-list 'org-load-path
65              (expand-file-name "org-ref" starter-kit-dir))
66
67 ;; for loading emacs-lisp files
68 (add-to-list 'load-path
69              (expand-file-name "org-ref" starter-kit-dir))
70
71 (org-require 'org-ref)
72 (org-require 'doi-utils)
73 (org-require 'pubmed)
74 (require 'jmax-bibtex)
75 #+END_SRC
76
77
78 You should set these variables. Here is an example of how mine are set in an init.el file.
79 #+BEGIN_SRC emacs-lisp
80 (setq reftex-default-bibliography '("~/Dropbox/bibliography/references.bib"))
81
82 ;; see org-ref for use of these variables
83 (setq org-ref-bibliography-notes "~/Dropbox/bibliography/notes.org"
84       org-ref-default-bibliography '("~/Dropbox/bibliography/references.bib")
85       org-ref-pdf-directory "~/Dropbox/bibliography/bibtex-pdfs/")
86 #+END_SRC
87
88 You may want to set some convenient keys for working in your bibtex file:
89
90 #+BEGIN_SRC emacs-lisp
91 (global-set-key [f10] 'org-ref-open-bibtex-notes)
92 (global-set-key [f11] 'org-ref-open-bibtex-pdf)
93 (global-set-key [f12] 'org-ref-open-in-browser)
94 #+END_SRC