Reference data output formats
Prev | Chapter 14. Tools for reference and notes management | Next

## Reference data output formats

refdbd implements several standard backends for data output. You can select them with the `-t` option of the getref command in refdbc. Remember that all backends just send data. It is your decision what you want to do with the information. You can either view the data on the screen or pipe them to another application or write them to a disk file.

### scrn

The screen backend provides a basic data output for viewing in a terminal, preferably through a pager. By default, the reference ID, the publication year, the authors, the title, and the source information are displayed. You can use the `-s` option to additionally display the abstract (AB or N2), the notes (N1), the reprint info (RP), the address (AD), the publisher (PB), the city (CY), the ISSN/ISBN (SN), the URL (UR), and the user (U1 through U5) and misc (M1 through M3) fields. In addition, the pseudo-field codes NX (all notes) and LX (all links, including UR and DOI) can be used. To specify several fields, simply concatenate the field codes, as in `-s ADPBRP`. `-s ALL` will display all available fields.

### html

The html backend works just like the scrn backend, but encodes this information in a HTML text. This comes in handy if you would like to view the results of your queries in a web browser rather than in a terminal window. This is also the easiest way to obtain fairly nice-looking printed output of your reference data. You simply use the `-o` switch to write the results of your queries to a file, reusing the same filename for each query. After each query you just have to hit the reload button of your browser to view the results of the most recent query.

The visual appearance of the generated HTML files can be customized using CSS files. The URL of the CSS file must be specified with the refdbc `-G` command-line option or by setting the configuration variable `cssurl`. The global configuration file `/usr/local/etc/refdb/refdbcrc` is preconfigured with a `cssurl` entry pointing to the default CSS file installed in `/usr/local/share/refdb/css`. If you want a different appearance, it might be prudent to create a copy of this CSS file and customize it as you see fit. The following element classes can be customized. In most cases, the class name reflects the database field to be formatted:

- H1.h1

- H2.id

- P.title

- P.authors

- P.abstract

- P.note

- P.address

- P.city

- P.publisher

- P.m1, P.m2, P.m3

- P.u1, P.u2, P.u3, P.u4, P.u5

- P.url

- EM.periodical

- EM.volume

- EM.issue

- EM.page

### xhtml

This is a variant of the html output which creates valid XML output according to the XHTML V1.0 Transitional DTD.

### ris

This is identical to the input format. Use it to export references to other reference management systems.

### risx

Retrieves the data as an XML document using the risx DTD. Use it to edit references or to create backups of your databases. The default output includes a docline and an internal subset declaring some common entities. This format works ok for DTD-based processing systems. If you require namespaced output for further processing with schema-based tools, use the `-n` option to declare a namespace prefix.

### mods

This backend retrieves the data as an XML document using the MODS schema. This is another useful exchange format for bibliographic data. Use the `-n` option to retrieve namespaced output with the given namespace prefix.

### bibtex

This backend provides output formatted for use as a bibtex reference database. This can be used with the tex and bibtex applications to create bibliographies for documents written with Donald Knuth's famous TeX typesetting system. The `-s` option cannot be used with this backend and will be ignored.

### db31

The DocBook SGML backend formats the query result as a `bibliography` element in a SGML document using the DocBook DTD. RefDB outputs an appropriate doctype string at the beginning of the data. The string is commented out so the contents can be directly inserted into a larger document by some processing application. If you need the data as a standalone document, simply use a script to uncomment the first line. The `-s` option cannot be used with this backend and will be ignored. This option is called “db31” to distinguish it from any later additions that may be necessary due to possible incompatibilities in new DocBook versions. It just means that the SGML that this backend creates should work with DocBook V.3.1 or later unless a new backend will be added.

### db31x

The output is essentially the same as with the preceeding backend but you'll get a DocBook XML document instead. The default output works for DTD-based processing with DocBook XML versions 4.x. If you need namespaced output for schema-based processing, use the `-n` option to define a namespace prefix.

### db50x

This backend outputs schema-based DocBook V5. The default output declares a default namespace. You can use the `-n` option to define a namespace prefix which will be used in all elements.

### teix

The TEI XML backend formats the query results as a TEI P4 `listBibl` element. RefDB outputs an appropriate processing instruction and doctype string at the beginning of the data. The string is commented out so the contents can be directly inserted into a larger document by some processing application. If you need the data as a standalone document, simply use a script to uncomment the first line. The `-s` option cannot be used with this backend and will be ignored.

### tei5x

This backend outputs schema-based TEI P5. The default output declares a default namespace. You can use the `-n` option to define a namespace prefix which will be used in all elements.

Prev | Up | Next
refdb_latex2utf8txt | Home | Extended notes output formats