X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=README.org;h=e1c57aceeb1e8c58282495a128d28b6337c60f81;hp=024bab840e4155691d9cfb61e05b95a3db2137b2;hb=a68349f9503f2bb74321fe9a8a422d1e81400c2e;hpb=7b6eedc9d1d351bb4913c907ad0dcd4209e7537b diff --git a/README.org b/README.org index 024bab8..e1c57ac 100644 --- a/README.org +++ b/README.org @@ -1,6 +1,12 @@ #+TITLE: org-ref: citations, cross-references, indexes, glossaries and bibtex utilities for org-mode -You should read [[./org-ref.org]]. It contains all documentation and installation instructions. +#+BEGIN_HTML + +#+END_HTML + +See http://www.youtube.com/watch?v=Zya8SfmCtFA and https://www.youtube.com/watch?v=JyvpSVl4_dg for examples of org-ref in action. + +[[./org-ref.org]] contains all documentation and installation instructions. [[./doi-utils.org]] contains functions for downloading bibtex entries from a DOI, and redefines the org-mode doi link so it has more functionality. @@ -15,3 +21,78 @@ You should read [[./org-ref.org]]. It contains all documentation and installatio 4. Function to replace non-ascii characters in bibtex entries 5. Functions to replace journal names with @string entries, and corresponding short/long names. + +To install this, add the org-ref repo directory to your load-path, and + +#+BEGIN_SRC emacs-lisp +(add-to-list 'load-path "path-to-org-ref") +(require 'jmax-bibtex) +#+END_SRC + +* Installation +You should clone this repository somewhere. + +Here is how I load org-ref. This code is in my init.el file. + +#+BEGIN_SRC emacs-lisp +;; remember this directory +(defconst starter-kit-dir (file-name-directory (or load-file-name (buffer-file-name))) + "Directory where the starterkit is installed.") + +;;;;;;; org path for loadable org-files +(defvar org-load-path + (list (file-name-as-directory + (expand-file-name "org" starter-kit-dir))) + "List of directories to find org-files that `org-babel-load-file' can load code from.") + +(defun org-require (feature) + "Load a FEATURE from an org-file. +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'." + (let ((org-file (concat (symbol-name feature) ".org")) + (path)) + + ;; find the org-file + (catch 'result + (loop for dir in org-load-path do + (when (file-exists-p + (setq path + (expand-file-name + org-file + dir))) + (throw 'result path)))) + (let ((default-directory (file-name-directory path))) + (org-babel-load-file path)))) + +;; https://github.com/jkitchin/org-ref +;; for loading org-files +(add-to-list 'org-load-path + (expand-file-name "org-ref" starter-kit-dir)) + +;; for loading emacs-lisp files +(add-to-list 'load-path + (expand-file-name "org-ref" starter-kit-dir)) + +(org-require 'org-ref) +(org-require 'doi-utils) +(org-require 'pubmed) +(require 'jmax-bibtex) +#+END_SRC + + +You should set these variables. Here is an example of how mine are set in an init.el file. +#+BEGIN_SRC emacs-lisp +(setq reftex-default-bibliography '("~/Dropbox/bibliography/references.bib")) + +;; see org-ref for use of these variables +(setq org-ref-bibliography-notes "~/Dropbox/bibliography/notes.org" + org-ref-default-bibliography '("~/Dropbox/bibliography/references.bib") + org-ref-pdf-directory "~/Dropbox/bibliography/bibtex-pdfs/") +#+END_SRC + +You may want to set some convenient keys for working in your bibtex file: + +#+BEGIN_SRC emacs-lisp +(global-set-key [f10] 'org-ref-open-bibtex-notes) +(global-set-key [f11] 'org-ref-open-bibtex-pdf) +(global-set-key [f12] 'org-ref-open-in-browser) +#+END_SRC