RefDB Features: Emacs support
RefDB integrates nicely into Emacs. Combined with editing modes for SGML, XML, LaTeX, Muse, and RIS documents, you'll get an integrated authoring environment with direct access to your bibliographic data. "Cite-while-you-write", document transformation, and previewing is just a few mouseclicks away for DocBook SGML and XML as well as for TEI XML documents.
Emacs support is not included in the RefDB sources, but available separately as an autotools-based package including a manual, allowing a
./configure && make && make install kind of installation on most Unix-style systems. There is also a Debian package available. If you want to test the latest versions, follow the links provided below to access the current Subversion versions.
If your editor of choice should be Emacs or XEmacs, the RIS major mode (ris.el) will make editing RIS datasets a little bit more comfortable. Font-locking will help you to spot syntax errors. Especially the end tag (ER - ) is prone to lack the trailing space if you're not careful. The ris-mode displays valid tags in blue, except the special type (TY - ) and end (ER - ) tags which are shown in red. The tag contents are colored according to several criteria. If the contents of a field is limited in length, the color will extend only up to that limit. Author/editor, publication date, and reprint fields are checked for a valid content. ris-mode also provides the following commands:
insert-set(C-c-C-s): inserts a new skeleton dataset (a "reference"). The function will prompt you to enter the publication type. You can use either the auto-completion feature of the minibuffer to enter a valid type or the history feature to select a previously entered type. The function will create a newline, a type tag with the type you selected, default sets of tags for a selected range of types, as well as an end tag.
insert-tag( C-c-C-t): insert a new tag. Use either the auto-completion feature of the minibuffer to enter a valid tag or the history feature to select a previously entered tag.
duplicate-tag(M-RET): insert a new line below the current line with the same tag as the current line. This command is convenient if you add multiple keywords or authors, each of which have to go on separate tag lines.
forward-set(C-x]): move between RIS datasets.
widen(C-xnw): narrow the buffer to the current RIS set and widen to the full buffer contents.
The mode currently does not check the length of author entries, nor does it handle continued lines in any way. It does not attempt to check whether a reference is complete (e.g. it won't notify you if there is no author)
To install this mode on your system, follow the instructions in the manual or in the elisp code.
Fig. 1: Emacs ris-mode. The reference shows the effects of a few common syntax errors: (1) the last author has a space after the period, (2) the secondary publication date lacks the mandatory slashes, (3) the JF tag is misspelled, and (4) the ER tag lacks the trailing space. Note also that fields with unlimited length (like AD) and fields with limited length (like KW) are colored differently.
- It works nicely alongside the major modes ris-mode, nxml-mode, and PSGML. refdb-mode can be automatically activated in these modes, and commands that return data in either of these formats set the appropriate mode automatically.
- It provides menu entries to add, update, delete, and search for references and notes. Retrieved references and notes in either RIS or risx format can be edited in place and subsequently be updated in the database.
- You can use tab completion to insert author names, periodicals, or keywords into reference data, thus avoiding typos for items already present in the database.
- Queries using author names, periodical names, or keywords are simplified by tab-completion as well.
- You can run queries on a selected region. E.g. you can highlight a word or a phrase in the title of a reference and see whether references exist that use this word or phrase as a keyword. This feature is not restricted to reference data. You can e.g. insert citations into any type of document, like todo-lists or planner pages, by simply typing the citation key. Whenever you need to get back to the cited reference, just run a query on the highlighted citation key.
- Reference data in formats that RefDB cannot natively import or generate can be converted by Chris Putnam's bibutils via menu commands.
- A menu shows the databases that the current user has permissions to access.
- DocBook SGML and XML as well as TEI XML files can be created via the refdbnd script
- A set of commands allows to add citation elements in DocBook or TEI formats to the kill ring, containing one or more references returned by a previous query. These elements can then be yanked into your DocBook or TEI documents.
- These documents can be transformed to various output formats via menu commands, and the output can be viewed immediately in external viewers via the menu
- A full range of administrative commands helps the RefDB administrator to get his work done. This includes the control of the application server and shortcuts to edit the RefDB configuration files.Administration is simplified by tab-completion for filenames and for character encodings.
- Bibliographic styles can be added, retrieved, and directly edited.
To install this mode on your system, follow the instructions in the elisp code, or use the autotools-based package for a simplified installation.
Emacs refdb-mode demos
In order to see refdb-mode in action, please see the following Flash demos. They will open in a separate browser window (if nothing happens, your browser suppresses popups. Right-click the link and select "Open in new tab"). A Flash 5 plugin is required to view the demos. If you can't view the demos, please refer to the screenshots below.
Reference management (548kB)
Fig. 2: Emacs refdb-mode, showing the available menu commands to retrieve references. The two buffers show the result of retrieving references in risx format. The output buffer contains the data proper, which can be edited and validated using the automatically invoked nXML mode. The messages buffer contains the command summaries of the most recent commands.
Retrieving references from a region
Fig. 3: You can mark any word or phrase while editing your document and see whether there is a matching reference in your RefDB database. This also means that you can use refdb-mode with any major mode even if there is no specific support for it. To insert a "citation" into an arbitrary document, just type the citation key (e.g. in brackets in a text, or in a comment of any programming language). Double-click the citation key and retrieve the associated reference via the menu shown above.
Fig. 4: Put the cursor somewhere into the reference you want to cite, or select a region containing the relevant citations. Then use one of the menu commands to insert a RefDB citation for DocBook or TEI into the kill ring. Back in your document, yank the citation.
Converting bibliographic data
Fig. 5: refdb-mode offers commands to run the bibutils tools on the contents of the current buffer. This makes import of reference data not directly supported by RefDB a breeze. Shown here is the import of MODS data.
Fig. 6: Select one of the databases which you have access to from a convenient menu.
Administering your RefDB installation
Fig. 7: refdb-mode contains a complete interface to all administrative tasks. The mode will invoke sudo for all commands that require administrative privileges.