To install docanno from MELPA, issue the following command:
package-install RET docanno RET
To find out more about MELPA visit http://melpa.org/#/getting-started.
At first, require docanno-mode and the backends and viewers you want to
use. Currently, org-mode is the only supported backend. See Viewers
and Backends for more information.
(require 'docanno)
(require 'docanno-org)
(require 'docanno-doc-view)Now set the default viewer you would like to use.
(setq-default docanno--current-viewer "doc-view")You can do the same with docanno--current-backend to set the default
backend. Note, however, that a backend usually defines the :mode
property that causes it to be automatically activated in the given
modes.
All user facing variables can also be configured via the Customize interface.
Open an org file of your choosing and insert the property given via
docanno-org-doc-property either at the top of the file or for a
specific subtree. Finally do M-x docanno-mode RET to activate
docanno.
The repository for this project is hosted on Github. If you want to contribute source code or documentation you are welcome to either mail me a patch or fork this repository on Github and send me a pull request.
A viewer is something that can display a given page in a document.
This is the minimal requirement for something to be usable as a viewer
by docanno.el. In order to support extra features a viewer may offer
further functionality to docanno.el.
Each viewer is configured as an element in the plist docanno-viewers,
keyed by its name. Each such element is in turn a plist with :name
and :display as mandatory keywords. All keywords are listed below.
:nameThe name of the viewer. Must be unique under all viewers indocanno-viewers. This is also used in the user interface.:displayA command that displays a given page in a given document.:pageA command returning the page currently displayed by the viewer.:max-pagesA command returning the total number of pages of the currently displayed document.:zoom-inA command that zooms into the given document.:zoom-outA command that zooms out of the given document.
A command is either a string or an elisp function. For a more
detailed documentation see the doc string of docanno-define-viewer.
docanno-define-backend. Said function takes several keywords that are
listed below. Mandatory keywords are marked with an asterisk.
:nameThe name of the backend. There can only ever be one backend associated with each possible name. If there a multiple backend definitions with the same name, the newset one takes precedence.:format-pageA function that returns a string representing the page number to be inserted at point.:extract-pageA function extracting the page the note at point refers to.:separatorEither a string or a function returning a string representing the separator between the page number and the actual note.:new-noteEither a string, a function returning a string or a function returningnil. The first two are used to denote the beginning of a new note. The third is responsible for inserting said beginning by itself.:file-nameA function returning the file name of the document the notes around point refer to.:modeA list of one or more major modes this backend is activated automatically.