Examples

The first example shows how to create a DocBook SGML bibliography file.

$~ refdbib -d myrefs -S "Br.J.Pharmacol." -t db31 -D "." mypaper.id.xml > mypaper.bib.sgml

This command will use the database "myrefs" to retrieve the references defined in mypaper.id.xml. They will be formatted according to the bibliography style called "Br.J.Pharmacol." and will be redirected into the bibliography file mypaper.bib.sgml. The DSSSL driver file (it will be automatically named after the bibliography style, that is Br.J.Pharmacol.dsl) will be stored in the current working directory. For further information how to generate the citation listing in mypaper.id.xml, see DocBook.

The second example shows how to create the BibTeX bibliography from your LaTeX document (it is assumed that you ran latex at least once before this command. See LaTeX/BibTeX for further explanations).

$~ refdbib -d myrefs -S "name" -t bibtex mypaper.aux > mypaper.bib

This command will use the database "myrefs" to retrieve the references defined in mypaper.aux. The intermediate bibliography database will be stored in mypaper.bib and will serve as an input file for bibtex.

Note: For the sake of consistency with bibtex, it is possible to specify the auxiliary file without the .aux extension (mypaper in the above example).

If you are working on a long document that cites the same references over and over again, it may be prudent to preprocess the .aux file in order to eliminate duplicates (duplicates do not confuse bibtex but they waste space):

$~ sort mypaper.aux | uniq | refdbib -d myrefs -S "name" -t bibtex > mypaper.bib

Note: The runbib script does exactly this kind of preprocessing automatically.