14.2. Starting refdbib

To run refdbib, use the command:

refdbib [-d database] [-D stylespec-directory] [-e log destination] [-E encoding] [-f stdin] [-h] [-i IP-address] [-l log level] [-L log file] [-m] [-n] [-N number] [-p port] [-q] [-S style] [-t output-type] [-T time] [-u name] [-v] [-V] [-w password] [-y confdir] [filename]

Remember that you don't have to specify all command-line options each time if you define the values in .refdbibrc.

Use the -d option to specify the database that you want to work with. This will be the default database for all references unless the input file explicitly states the database for some or all citations.

refdbib will create a style specification file for the subsequent transformation of your document with each run, unless you use the -n switch. These files will be stored in the directory that you specify with the -D option. Specify either a full path or "." to use the current working directory. The latter case is what you usually want if you run refdbib from the directory where your LaTeX or SMGL/XML document is stored. This is also the default if you do not specify a directory at all.

Use the -E option to select a useful output character encoding. If this option is not used, the bibliography data will use the character encoding of the database. See man iconv_open for a list of available encodings.

The -f stdin option is a crutch to make reading data from stdin possible on platforms that do not allow automatic detection of data on stdin, like Windows/Cygwin. On other platforms, refdbib automatically reads data from stdin if data are available.

If you pass the -m option to refdbib, missing references (i.e. cited references that are not in the database) will not cause an error. Processing scripts like runbib will thus continue regardless instead of throwing in the towel.

The -n option instructs refdbib not to create style specification files. Use this option if you are sure that a current style specification file already exists. This saves about as much computing time as you need to key in this option.

Use the -N option to specify where the numbering of the references is supposed to start. The default is 1. This option comes in handy if you need to cobble together composite bibliographies or per-chapter bibliographies that still need to be numbered consecutively.

The -S option specifies the bibliography style. This controls the formatting of the bibliography and the in-text citations when the source document is processed. Possible values can be obtained with the liststyle command in refdbc.

The -t option selects the type of output. Use "db31" to generate DocBook SGML bibliographies, "db31x" for DocBook XML bibliographies, "teix" for TEI XML bibliographies, and "bibtex" for BibTeX bibliographies. The type of output also determines the type of style specification file, if any, that will be generated in addition to the bibliography for formatting purposes. This is only a matter of concern if you want to process a DocBook XML document with the DSSSL stylesheets: In this case you should use "db31" with this option. The SGML bibliography element is also a valid XML element, but you will get a DSSSL driver file instead of a XSL driver file when you use "db31x".

Note: In the current implementation, the -t teix option will also return a DocBook bibliography which needs to be transformed to a TEI bibliography with the bibdb2tei.xsl stylesheet.

The purpose of all other command-line switches is explained in the section common command-line options.

refdbib accepts the data either at stdin or from a data file which is specified on the command line. All output will be written to stdout.

The exit code is 0 if everything went fine and >0 if an error occurred.