Manage bibliography styles

Bibliography styles are defined as XML documents. Each document contains one or more bibliography styles for a particular journal or publisher. The bibliography styles need to be added to the refdb database before they can be applied to your documents. The bibliography style controls, among others, characteristics like:

Note: The extensive formatting specifications of the refdb bibliography styles are almost wasted on BibTeX bibliographies currently. You still need one of the native BibTeX styles to do the actual formatting until refdb bibliography styles can be exported as BibTeX styles. The current implementation uses only the formatting information of the journal name to allow either the full name or one of the abbreviations to appear in the bibliography. So for the current implementation you can get away with just two simple styles that define only the journal name formatting for the "GEN" publication type. These can be found as bibtex-abbrev.xml and bibtex-full.xml in the style directory of the source distribution.

It is admittedly no easy task to write correct bibliography styles from scratch. It may be easier to pick a similar style (if there is one) and modify it to your needs. In this section you will find a brief overview how a bibliograpy style is put together. For more detailed information, please peruse the separate documentation of the CiteStyle XML DTD.

Write or modify a bibliography style file

It is recommended to use an XML editor like Emacs/PSGML to write bibliography styles using the CiteStyle XML DTD. This ensures that most XML errors get caught while you write. After you're done, the text should be validated with a validating SGML/XML parser like nsgmls or onsgmls.

The CITESTYLE element defines a bibliography style for one particular journal or publisher. You can group several styles in one file with the STYLESET wrapper element.

Each CITESTYLE element contains exactly three top-level elements (Figure 10-1). The STYLENAME defines the name of this style. For the sake of simplicity this could be identical with the name of the journal or publisher whose bibliography style it defines, e.g. "J.Biol.Chem.". The REFSTYLE element contains the style definitions for the various publication types that can appear in a bibliography, like books, journals, or personal communications. A special case is the type "GEN" which defines a default bibliography style that is applied whenever no specific definition is available for the requested type. Although the DTD does not enforce this, it is strongly recommended to define a "GEN" definition for each bibliography style. Finally, the CITSTYLE element defines the citation style, i.e. the appearance of the citations in the main text, as well as some general properties of the bibliography.

Figure 10-1. Schematic representation of a CITESTYLE element

Each definition for a publication type in turn can contain various elements that define the sequence and rendering of authorlists, publication dates, titles, and so on. This is where the real pain in defining bibliography styles lies. All available elements can hold a PRECEEDING and a FOLLOWING element which define strings that are inserted before and after the corresponding element, respectively. This can be used to place punctuation characters or brackets wherever such a non-empty element occurs. A special element is SEPARATOR which usually also contains punctuation characters. This element is always inserted even if the preceeding or following element is empty.

The CITSTYLE element can define three different styles for citations: INTEXTDEF for regular citations as well as AUTHORONLY and YEARONLY for citations that keep the authors in the flow of the text. These elements are equivalent to the definition of a publication type in the REFSTYLE element.

Please peruse the separate documentation for the CiteStyle XML DTD for the details about the individual elements.