Create RTF bibliographies
Prev | Chapter 10. Bibliographies | Next

## Create RTF bibliographies

Rich Text Format (RTF) is a plain-text format understood by most word processors. While RefDB does not integrate into the menu bar of M$ Word or OpenOffice, it still allows you to add bibliographies to word processor documents saved as RTF files. This is a one-way process which leaves your original document untouched. You can edit the compound document and save it to native word processor formats like `.doc` or `.odt`, but you'll have to start over with the RTF document as soon as you add, change, or remove citations. Therefore the following sequence (which will be familiar to the SGML/XML and LaTeX folks) is recommended when using RefDB to create bibliographies for word processor documents:

1. Author your document

   Write the contents of your document until you're really done. Use the citation format described further down. It does not matter which file format you use at this stage, as long as you can export it to RTF in the end.

2. Save your document in RTF format

   Now save your document as a RTF file. There may be an extra menu entry called Export but usually you can just select the file format in the Save as... dialog.

3. Create and insert the bibliography

   The exact procedure will be described below. The runbib command creates a bibliography file, and the refdbrtf tool combines the source document and the bibliography file to a new compound RTF document. Note that neither your word processor document nor the RTF copy are altered by this procedure.

4. Import and finalize your document

   You can now open the compound RTF document using your word processor and add final touches (like adding images which you don't need during the authoring step). You can save the document in a word processor format, print it, or export it as a PDF file.

As with SGML and XML documents, RTF documents can be maintained in a simple fashion using a refdbnd-created Makefile. The more complex way of running the involved tools manually essentially parallels the way used for SGML and XML documents and will not be elaborated here.

### Create a RTF document for use with RefDB

In contrast to SGML and XML documents, there is nothing special about RTF documents that you can use with RefDB. You should still run refdbnd and select "rtf" as a document type. This will generate a suitable Makefile and a skeleton RTF document. You can open that with your favourite word processor, or copy an existing RTF document and save it under the same name.

### Create citations in word processor documents

RefDB recognizes a simple plain-text citation format in RTF documents. Citations are enclosed in square brackets. Inside a citation, each reference is again enclosed in square brackets. References are identified by their citation keys, followed by one of "-X", "-A", and "-Y" to denote regular citations, author-only citations, or year-only citations, respectively (the RefDB low-level tools handle the first vs. subsequent occurrence issue silently for you, therefore there is no need for "-S" and "-Q" although these are valid too). The following text snippet shows some citations:

    ...was shown[[Miller1999-X]]. This was confirmed by other groups
    as well [[Doe2000-X][Jones2000-X]]. However, [[Nerd2002-A]] challenged this
    view in a recent work[[Nerd2002-Y]]...

### Process RTF documents

As word processor documents lack the separation between content and formatting, there is usually no transformation required to read or print a document. However, as the processing requirements from RefDB's point of view are not any different between RTF and XML documents, RefDB still has to transform your RTF document - to yet another RTF document. While doing so, it massages your in-text citations into appropriately formatted links to the bibliographic entries, and appends a formatted bibliographic listing. All you need to do is to run make. This will create the output file `foo.refdb.rtf` from your project file `foo.rtf`.

Prev | Up | Next
Create LaTeX/BibTeX bibliographies | Home | Using custom stylesheets to process documents with bibliographies